Skip to content
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

Keep field order consistent in OpenAPI Specification #280

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nooose
Copy link

@nooose nooose commented Feb 6, 2025

This PR fixes Issue #198 by referencing the comment on inconsistent field order and ensuring fields are generated in a consistent order in the OpenAPI specs.

Changes

  • Replaced HashMap with LinkedHashMap to keep order

This helps make the generated specs more predictable and easier to read

My code change might not be perfect, but it seems the issue arises during the process of constructing the HashMap.
Please review it, and if this isn't the correct solution, it would be helpful if the specification could be generated in the order the fields are declared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant