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

Enums in query params #25

Merged
merged 2 commits into from
Oct 31, 2023
Merged

Enums in query params #25

merged 2 commits into from
Oct 31, 2023

Conversation

kristerr
Copy link
Contributor

No description provided.

Comment on lines +103 to +108
val schema = new StringSchema
schema.setExample(param.sampleValue)
param.enums.foreach { values =>
schema.setEnum(values.toList.asJava)
}

Copy link

@rpiotrow rpiotrow Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Work nice for enum values, but example is still not rendered correctly:
Screenshot from 2023-10-18 11-19-58

Copy link

@rpiotrow rpiotrow Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example in the param is rendered incorrectly, while in the schema it is okay:

      - name: role
        in: query
        required: false
        schema:
          type: string
          example: Admin
          enum:
          - Admin
        example: {}

@kristerr kristerr merged commit c926c53 into master Oct 31, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants