You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A model combining other models with allOf doesn't show properly if there are 3 or more $ref usages on higher levels. In this case it usually has a value "string" or empty object.
To reproduce...
Steps to reproduce the behavior:
Go to editor.swagger.io
Paste the definition I left above
Compare responses of two paths. Notice how TheOneWhichBrakes model shows
You also can check a model called "HereBreaksToo"
Expected behavior
Referenced models should render their type despite of referencing depth.
Screenshots
Additional context or thoughts
I've managed to reproduce the bug using different environments:
I am facing the same issue, using open api 3.0.1, paths are before the components. My models are nested using mainly allOf refs.
I validated the schema. It's ok, I can see all the data in there.
Updated to the latest version today (using dist), the issue is still there.
No errors in the console. The schema tree simply stops at the third level and makes the rest as strings.
Tried the online swagger editor, and it produces the same issue.
I don't really know JS, but I've had a cursory look. sampleFromSchemaGeneric in fn.js doesn't seem to recognize or handle allOf at all? Meaning it falls back to type recovery, and from there "string".
Considering a grep for allOf turns up nothing in src/, I'm not sure how this works at all.
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
A model combining other models with allOf doesn't show properly if there are 3 or more $ref usages on higher levels. In this case it usually has a value "string" or empty object.
To reproduce...
Steps to reproduce the behavior:
TheOneWhichBrakes
model showsExpected behavior
Referenced models should render their type despite of referencing depth.
Screenshots
Additional context or thoughts
I've managed to reproduce the bug using different environments:
swagger-ui-express
[email protected]
[email protected]
WebStorm
Plugin OpenAPI Specifications 202.7319.8
editor.swagger.io
There is a feature here. It reproduces during the first render. But there is an algorithm which makes it display properly:
/works
path. It always showsTheOneWhichBrakes
model properly. You also can just expandTheOneWhichBrakes
model itself/breaks
path. It will show you the broken view/breaks
is rendered as intended nowThe text was updated successfully, but these errors were encountered: