-
Notifications
You must be signed in to change notification settings - Fork 9k
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
oneOf
containing only a single enum (or ref to one) does not display as drop-down
#7912
oneOf
containing only a single enum (or ref to one) does not display as drop-down
#7912
Comments
This is needed to have defaults/descriptions/examples/etc defined at the endpoint level, while using a shared definition for the enum. |
From further experimentation, this also affects |
I have the same issue using oneOf |
hello @hauntingEcho I try to solve partially-related topic about nullable enums (described here) and the core issue is around using Could you explain why do you need to wrap enum refs with If yes, why not use
would it work for your case? |
Hi @bnowak , the OpenAPI files which led me to open this issue were generated from code via the C# library NSwag, although my sample file was manually written. This was at a previous job, so I don't still have access to the relevant source to poke at. |
I don't know what is the specific use case for @hauntingEcho, but in my case, I want to generate some query filter parameters to my spec, in order to use queries with
|
@mbsanchez01 yeah, your case looks on different and more complex one. The spec looks to be correct. However, I'm not sure swagger-ui is able (and whether should be in fact) to determine such complex schema compositions and render drop-downs for instance. If there's On your example, what would be expectation to render field which can have multiple types/values and be object as well? All of that doesn't mean the spec is not correct and API endpoint couldn't be used as expected with passing all defined sub schemas |
…parameter-row rendering Refs #7912
Hi everybody, This issue has been addressed in #9934 More info in: #9934 (comment) |
Q&A (please complete the following information)
Content & configuration
Dist assets with the below YAML, running on an S3 bucket with website config enabled.
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
I'm using the plain HTML/JS distribution, only changing the URL to be relative:
Describe the bug you're encountering
All six endpoints above should display with dropdowns for their enumeration values. /1 and /6 display with text boxes instead.
To reproduce...
Steps to reproduce the behavior:
order
.Expected behavior
All six endpoints displayed identically
Screenshots
The text was updated successfully, but these errors were encountered: