Skip to content
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

Use default base URI for exclusive refs #147

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

davishmcclurg
Copy link
Owner

In drafts 7 and earlier, all keywords except definitions are ignored when $ref is present. This includes $id, which means refs are resolved using the schema's inherited base URI (default or parent). Currently, when $id is present, the inherited base URI isn't being registered as a ref resolution resource (with ID_KEYWORD_CLASS.new), which causes JSON pointer ref resolution to fail. The fix here is to add the exclusive ref case for the ID_KEYWORD_CLASS.new call.

The rest of the changes are from if/else cleanup.

Closes: #146

In drafts 7 and earlier, all keywords except `definitions` are ignored
when `$ref` is present. This includes `$id`, which means refs are
resolved using the schema's inherited base URI (default or parent).
Currently, when `$id` is present, the inherited base URI isn't being
registered as a ref resolution resource (with `ID_KEYWORD_CLASS.new`),
which causes JSON pointer ref resolution to fail. The fix here is to add
the exclusive ref case for the `ID_KEYWORD_CLASS.new` call.

The rest of the changes are from if/else cleanup.

Closes: #146
@davishmcclurg davishmcclurg merged commit 4f9d6e4 into 2.1.0 Oct 17, 2023
62 checks passed
@davishmcclurg davishmcclurg deleted the exclusive-ref-id-and-json-pointer branch October 17, 2023 20:59
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.

None yet

1 participant