Skip to content

Fix local sibling $ref resolution when $id does not end with file name#1230

Merged
datho7561 merged 1 commit intoredhat-developer:mainfrom
shin19991207:chang-patch-1228
Apr 15, 2026
Merged

Fix local sibling $ref resolution when $id does not end with file name#1230
datho7561 merged 1 commit intoredhat-developer:mainfrom
shin19991207:chang-patch-1228

Conversation

@shin19991207
Copy link
Copy Markdown
Member

What does this PR do?

Implemented fallbackBaseURL so local schema like file:///.../repro_main_schema.json can still resolve $ref: ./repro_defs.json from the local directory even if its top-level $id is something unrelated like https://example.com/schemas/repro-main-v1.

fallbackBaseURL represents the actual schema resource we loaded from disk and is used for local-sibling fallback.

What issues does this PR fix or reference?

Fixes #1228

Is it tested? How?

  • New automated tests
  • Test manually

@shin19991207 shin19991207 requested a review from datho7561 as a code owner April 14, 2026 04:44
Copy link
Copy Markdown
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and fixes the issue. Thanks, Morgan!

…le name

Signed-off-by: Morgan Chang <shin19991207@gmail.com>
@datho7561 datho7561 merged commit d11461a into redhat-developer:main Apr 15, 2026
4 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.

Issue with local refs in local schema when ID does not end with file name

2 participants