-
-
Notifications
You must be signed in to change notification settings - Fork 528
Objects properties order is not preserved with springdoc.api-docs.resolve-schema-properties = true #1274
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
I found the what's causing above problem, setting the property: has that side effect. |
There is no such expected order. |
Thanks @bnasslahsen for answer, but I think the issue should be still opened. The Please note that, with default springdoc/swagger configuration properties order is(and should be) preserved! Check all examples etc.! The problem starts when you set the IMO properties order is important aspect in documentation description, you don't want to put items which are less relevant on the top of the object description. |
Make sure you Provide a Minimal, Reproducible Example - with HelloController that reproduces the problem which proves your affirmation. This ticket can be reopened, if the relevant information are provided. |
@bnasslahsen Thanks for quick answer! Please check this project https://github.com/jawpio/springdoc-property-ordering-test I think it's as minimalistic as possible, and please check the ReadMe to reproduce the issue. |
…olve-schema-properties = true. Fixes springdoc#1274.
Uh oh!
There was an error while loading. Please reload this page.
For some projects the object properties order is not preservered in the schema.
I checked the sample-springdoc-openapi-person-service if I change the Person properties order it's reflected in the swagger specification.
I created a minimalistic project which shows that the properties order is not preserved https://github.com/jawpio/springdoc-property-ordering-test.
In above project you can see that the SampleResponseClass looks as follows:
but it's generated as:
I tired to find what's causing that issue, but I was unable to find the reason yet.
The text was updated successfully, but these errors were encountered: