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

openapi: status code responses shouldn't be in openapi output #1794

Closed
jknack opened this issue Jun 17, 2020 · 0 comments
Closed

openapi: status code responses shouldn't be in openapi output #1794

jknack opened this issue Jun 17, 2020 · 0 comments
Milestone

Comments

@jknack
Copy link
Member

@jknack jknack commented Jun 17, 2020

When a controller returns a io.jooby.StatusCode, the openapi includes it as schema object:

openapi: 3.0.1
info:
  title: 1792 API
  description: 1792 API description
  version: "1.0"
paths:
  /:
    post:
      summary: This is the post for testSuite
      description: TestSuite change1234 Description
      operationId: User creation
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusCode"
components:
  schemas:
    StatusCode:
      type: object

This is wrong. Correct output must be:

openapi: 3.0.1
info:
  title: 1792 API
  description: 1792 API description
  version: "1.0"
paths:
  /:
    post:
      summary: This is the post for testSuite
      description: TestSuite change1234 Description
      operationId: User creation
      responses:
        "200":
          description: Success
@jknack jknack added this to the 2.8.6 milestone Jun 17, 2020
@jknack jknack closed this in 827bf12 Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant