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

using oneOf with const values, 0 is rendering as "integer" #2349

Closed
mykelscappin opened this issue Jul 5, 2023 · 1 comment · Fixed by #2350
Closed

using oneOf with const values, 0 is rendering as "integer" #2349

mykelscappin opened this issue Jul 5, 2023 · 1 comment · Fixed by #2350
Assignees

Comments

@mykelscappin
Copy link

Describe the bug
using oneOf with const values, 0 is rendering as "integer", while other const values are rendering as documented

Expected behavior
const: 0 should render as 0 in the UI

responses:
  "200":
    description: OK
    content:
      application/json:
        schema:
          type: object
          properties:
            data:
              type: object
              properties:
                response_code:
                  type: integer
                  description: A numeric response code
                  oneOf:
                    - const: 0
                      description: >
                        Description for const 0
                    - const: 1
                      description: >
                        Description for const 1
                    - const: 2
                      description: >
                        Description for const 2

Screenshots
Screenshot 2023-07-05 at 11-30-18

Additional context
None

@lornajane
Copy link
Contributor

Thanks for spotting this and letting us know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants