-
Notifications
You must be signed in to change notification settings - Fork 9.1k
UI does not show the default value when one is assigned for an enum #3518
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
Comments
In addition to not showing the default, the rendering does not enumerate the valid values; whereas |
However the Try it Out drop down does list the enumerated values and properly selects the default. but the doc should also show this w/o having to open the Try It Out. The default for an enum in the definitions/models is shown correctly. |
@masterof0, I think you're describing a related, but different issue. We'd appreciate it if you would open a new ticket for that! Edit: To clarify, OP's issue is with a Swagger 2.0 definition, while your issue is unique to OpenAPI 3.0's rendering. |
I opened #3873 about rendering enums in parameter descriptions. |
Closing as resolved, thanks for reporting! |
@webron could you please point to commit where the default values are displayed in Swagger UI for 2.0 version of specification? As far as I see in my Swagger UI, it's not resolved yet. |
@DenisGorbachev, I believe this commit added the default value display: a47da98 |
The GET in the below OpenAPI yaml contains a parameter named imageSize, but the rendering of the query parameters does not disclose the default. Note that swagger-codegen (-l html) includes the default at the end of the description field
current Swagger UI rendering:

The text was updated successfully, but these errors were encountered: