Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nested components on response body #703

Open
Tracked by #646
mcruzdev opened this issue Apr 17, 2024 · 1 comment
Open
Tracked by #646

Add nested components on response body #703

mcruzdev opened this issue Apr 17, 2024 · 1 comment
Labels
added to backlog The issue was added to backlog area:wiremock Stale

Comments

@mcruzdev
Copy link
Collaborator

Actually (the first wiremock implementation), when we are generating wiremock stubs from OpenAPI specification, we are not getting nested components:

"Pet": {
        "required": [
          "name",
          "photoUrls"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 10
          },
          "name": {
            "type": "string",
            "example": "doggie"
          },
          "category": {
            "$ref": "#/components/schemas/Category"
          },
          "photoUrls": {
            "type": "array",
            "xml": {
              "wrapped": true
            },
            "items": {
              "type": "string",
              "xml": {
                "name": "photoUrl"
              }
            }
          },
          "tags": {
            "type": "array",
            "xml": {
              "wrapped": true
            },
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "status": {
            "type": "string",
            "description": "pet status in the store",
            "enum": [
              "available",
              "pending",
              "sold"
            ]
          }
        },
        "xml": {
          "name": "pet"
        }
      }

The category property is null:

    {
      "request": {
        "urlPathTemplate": "/pet",
        "method": "POST"
      },
      "response": {
        "status": 200,
        "body": "{\"photoUrls\":null,\"name\":\"doggie\",\"id\":10,\"category\":null,\"tags\":null,\"status\":null}"
      }
    },

We need to add the category correctly.

This was referenced Apr 17, 2024
@mcruzdev mcruzdev added the added to backlog The issue was added to backlog label Apr 17, 2024
@mcruzdev mcruzdev added this to the Wiremock Implementation M1 milestone Apr 17, 2024
@ricardozanini ricardozanini added area:client This item is related to the client extension area:wiremock labels Apr 18, 2024
@mcruzdev mcruzdev removed the area:client This item is related to the client extension label Apr 19, 2024
Copy link
Contributor

@ricardozanini @hbelmiro This is being labeled as Stale.

@github-actions github-actions bot added the Stale label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added to backlog The issue was added to backlog area:wiremock Stale
Projects
None yet
Development

No branches or pull requests

2 participants