Skip to content

Fix nested internal refs - #3

Merged
sunkan merged 4 commits into
stefna:mainfrom
runar-stefna:fix-nested-internal-refs
Jun 2, 2026
Merged

sunkan merged 4 commits into
stefna:mainfrom
runar-stefna:fix-nested-internal-refs

Conversation

@runar-stefna

Copy link
Copy Markdown
Contributor

Noticed an issue when trying to inline a (probably old) schema from checkit. The inliner seems to lose context and not be able to solve absolute references. Inlining resulted in an JsonPointer\Exceptions\InvalidPointer: Invalid pointer syntax .
Fix this by keeping track of the file that is being processed so that absolute references can be resolved that way.

Added a couple of examples that highlight the issue.

When inlining nested interal references, the inliner loses the full
context of the schema and crashes (since it is trying to resolve a
reference that does not exist in the sub schema it is currently working
with).
Keep track of the full schema for the file that is being process and
pass that down to be able to resolve absolute internal references.
Original schema comes from checkit, remove all the additional fluff that
has nothing to do with the issue.
@sunkan
sunkan merged commit 79ebf75 into stefna:main Jun 2, 2026
11 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