-
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
Errors displaying schemas with oneOf #9790
Comments
The issue on the surface looks like it was introduced by 7300e6c but it seems like it actually uncovered a different issue, which you can see in Swagger Editor. The names there are displayed correctly: but if we actually expand the schemas: you can see that The resolved subtree for OneOfParent:
We can see both the resolved If we expand FirstOneOf first and then OneOfParent, we'll get this: This looks to me like an issue with the resolver - perhaps with allOf and circular / unresolved references. |
In theory, we could pass swagger-ui/src/core/components/model.jsx Lines 72 to 82 in 6e91056
have something like this:
this will work for the spec in the issue: But it will not solve it for cases where we have more than one circular reference, as the
and our rendered model will be missing If we swap the order of references in
This time It looks to me like we would somehow need to keep these unresolved |
|
Addressed in #9794 |
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
There are issues displaying OneOf objects in Swagger UI. It works properly in Swagger Editor.
In Swagger UI:
In Swagger Editor:
To reproduce...
Steps to reproduce the behavior:
OneOfParent
Expected behavior
The names should be displayed the same way as in Swagger Editor.
The text was updated successfully, but these errors were encountered: