WIP: Order HTTP Methods To Lessen Openapi JSON Diffs - #257
Open
ihassanein wants to merge 1 commit into
Open
Conversation
ihassanein
requested review from
aaparent,
aviau,
ireydiak,
jenip13 and
xvaier
as code owners
August 28, 2026 22:21
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
…essen openapi.json diffs
ihassanein
force-pushed
the
iman/v2-v3-spec-ordering
branch
from
August 28, 2026 22:25
b551f30 to
898a026
Compare
Member
|
I'd only argue about the fact the functions are doing side effects (I'd prefer them to return a dict) and have pure functions: It's a detail as the other functions are doing side effects. Otherwise that's a great addition ! |
aaparent
approved these changes
Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a new post-processing step to assure that each openapi-v#.json does not include reordering of http methods as it hides things in the diff that could help us flag if things are being subtly added to the public api 👀
While testing I also saw schemas were changing order, so long as we do not touch the contents of the schema and just order them by their schema name this should bring no change to how information is presented in the documentation. I added another step scoped to just this.
When re-running the generate script more than once, the only noise that remains in the diff is the order of
search_types. This did not seem like a quick win to do within the docs repo and instead something we would need to investigate in the main codebase to determine why the order changes each run.Example diff after running the generate script, making a first commit, and running it again.
Ignoring the changes to swagger that I did not touch, the V2's 49 lines changed and the V3's 2 lines changed are all related to
search_types