-
Notifications
You must be signed in to change notification settings - Fork 17
Keep order of params when generating full spec #204
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@d-mo can you please use black
to format edited files and add a test case?
3052e82
to
f75c53d
Compare
@jirikuncar Done |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
f888638
to
0032101
Compare
Maintain param order everywhere
123173f
to
a431a05
Compare
Hi @jirikuncar I rebased the PR and @ckarageorgkaneen extended it to include the dicts under the components section. Are you interested in merging it? Is there anything else missing? |
Co-authored-by: Jiri Kuncar <[email protected]>
Co-authored-by: Jiri Kuncar <[email protected]>
@jirikuncar Thank you for the suggestions! I applied both. |
@d-mo I have done some testing and it is way slower when merging our large OpenAPI specifications.
Can we find a way that we could still use the |
@jirikuncar Can you test again? I was able to use CSafeLoader & CSafeDumper after switching to yamlloader. |
@d-mo it seems fine now. I don't see any major performance issue on large files. |
Hi @jirikuncar. I fixed the conflicts that came up. Is there any interest in merging this PR at some point? We'd love to use the official apigentools instead of maintaining our own fork. I think the changes might be useful to others as well. Thanks |
What does this PR do?
This PR utilizes yamlloader.ordereddict when loading the input yaml files. This way the order of the attributes does not change when generating the full specification.
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.