Skip to content

Improve inlining of allOf#2

Merged
sunkan merged 4 commits intostefna:mainfrom
runar-stefna:main
Jan 27, 2026
Merged

Improve inlining of allOf#2
sunkan merged 4 commits intostefna:mainfrom
runar-stefna:main

Conversation

@runar-stefna
Copy link
Contributor

Fix a few issues relating to inlining allOf clauses:

  • trying to merge allOf but path reference is not absolute
  • model is references in several allOf clauses

This should fix an issue with nested allOf which would fail when trying
to merge since the path was not absolute. So we keep track of the
internal parents path through the recursion to ensure the absolute path
within the document is kept track of.
Also ensure that if models are part of multiple allOf, that they will be
merged correctly.
The idea is to fix an issue with a model being references in several
allOf clauses. So we keep track of each model and the allOf's in that
model. When we encounter the same model again, we add all of the model's
allOf paths to the allOf collector array for later reference when
merging the schema.
This test verifies that multiple uses of models in allOf work as
expected when using the AllOfMerger. Also ensures that abosulte paths
are used when resolving the allOfs in the merger.
@sunkan sunkan merged commit 0775418 into stefna:main Jan 27, 2026
5 of 9 checks passed
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.

2 participants