-
Notifications
You must be signed in to change notification settings - Fork 60
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
Move the "description" out of "allOf"-declaration #204
Comments
@maxl2287 Thanks for sharing your issues with open api generators. The allOf with the description was added so that when the OpenAPI documentation is rendered it displays the top level description and not the description of the $ref. We use this in both redoc and the swagger editor To my knowledge, this is consistent with the Open API 3.0 specification. Please share if you find a reference in the spec where this isn't compliant. Which openapi generators are you having issues with? Have you confirmed that this isn't a bug with the generator? @jlurien I believe that you helped with this formating. Can you comment as well? |
Both the Swagger editor and ReDoc appear happy with this alternative construct, so I would support this for v0.10.0 onwards. For v0.9.0 however, I think that should remain as it is, as this is a tooling rather than specification issue, and a release candidate version was available for some time to give developers an opportunity to pick up on such issues with their tooling. It is not so difficult to make the changes manually if it is desired to implement v0.9.0 and your tooling objects. Alternatively, if we update v0.10.0-wip now, then that updated version (which will remain available through github, even if subsequent changes are made) will still effectively be v0.9.0, and can be used for implementation with tooling that experiences this issue. It was proposed in Commonalities that we adopt OAS v3.1 so that we can use reference objects that support descriptions without the need for the |
@eric-murray I guess when we will have v3.1 then maybe these "allOf"-behaviours may also be gone, yes. |
Hi @maxl2287, |
The alternate proposal is OK as it preserves the principle of $ref not having sibling elements. OAS 3.1 would also solve this but migrating to it has other implications. It allows to use all the potential JSON-schema to define more complex schemas for objects, which is nice, but many tools don't support it properly, so we'd probably have to limit in the guidelines how to use it or face many issues complaining about certain tools not supporting this or that. |
I'm here with @eric-murray and @jlurien
|
The new feature in OAS 3.1 is not supported by the viewers (Redoc, Swagger editor), while the alternate proposal is, so I would stick to the new alternate version. About fixing 0.9.x, it depends on the severity of the issue with the tooling. It is not a functional change so release scope is not altered. |
Hi all, And as I said in commonalities, editor-next.swagger.io supports version 3.1 as a redocly viewer in IntelliJ. |
Problem description
"allOf" including a $ref and a 'description' is not compatible with openapi - generators for later implemantation usage.
Expected behavior
The description should be out of the "allOf".
The text was updated successfully, but these errors were encountered: