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
Field order issue in JSON response #1107
Comments
Hi @Zerotask well this happens somewhere inside pydantic - django ninja sends fields definitions as dict (where fields are sorted as in Meta.fields) but apparently pydantic puts attributes defined on class first I think I raised this at pydantic issues once but did not get a solution.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed, that in the JSON response, the fields
measurements
andunits
are shown first, before the id, which looks weird.I thought the order is defined in meta fields. Is this a bug or how can I enforce the order from meta fields?
The text was updated successfully, but these errors were encountered: