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

Response models validate but do not appear in api docs #48

Open
eseyfried opened this issue Aug 22, 2021 · 0 comments
Open

Response models validate but do not appear in api docs #48

eseyfried opened this issue Aug 22, 2021 · 0 comments

Comments

@eseyfried
Copy link

eseyfried commented Aug 22, 2021

Given the following syntax from api.yaml, request validation works fine. However, the response model shows up as "string".
If I remove "shema" from the put responses object, then the api docs show the model correctly but then response validation fails. How can I achieve both?

/tenant/{tenantId}:
  put:
      ...
      responses:
            200:
              description: "OK"
              schema:     <-- keeping this here works for validation but not displaying the model
                $ref: '#/responses/Tenant'
responses:
  "Tenant":
    schema:
      $ref: '#/definitions/Tenant'
definitions:
  Tenant:
    type: "object"
    properties:
      status: 
        type: "string"
      data:
        type: "object"
        properties:
          id:
            type: "integer"
            format: "int64"
          firstName:
            type: "string"
          lastName:
            type: "string"
          email:
            type: "string"
          createdAt:
            type: "string"
          updatedAt:
            type: "string"
          deletedAt:
            type: "string"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant