-
Notifications
You must be signed in to change notification settings - Fork 90
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
Order of properties in class not maintained #314
Comments
Will this help: eclipse/microprofile-open-api#359 ? |
Yes exactly that. You mean with this keeping the order in the generated openapi doc the same as in actual json output? |
It would be OpenAPI only. Please try JsonbPropertyOrder on your POJO. |
I say that mainly because |
Yes, It's unfortunate Jsonb doesn't support a natural sorting option that can be set globally. |
PS: Created this issue in the Jsonb spec project to introduce a global |
Thanks @marceloverdijk. I am going to go ahead and close this as the root cause is the same as #87. Please feel free to re-open if you feel differently, etc. |
Especially with a code first approach I would assume the order of the properties as defined in a class will be maintained in the generated schema.
But instead the properties in the generated schema are alphabetically.
I tried configuring the order strategy in the JsonbConfig of my Quarkus app but Jsonb seems not to have an option to keep the order of the properties in the class, unlike e.g. Jackson supports this.
I also tried switching to quarkus-resteasy-jackson (instead of jsonb) and the actual JSON output is ordered as in the class, but the generated openapi schema the properties are still ordered alphabetically.
The text was updated successfully, but these errors were encountered: