-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return parent base URI when resolving ids
This is necessary because `$id` values are joined with the base URI when the [instance is validated][0] as well as when [ref JSON pointers are resolved][1]. This returns the parent base URI instead so that calling `join_uri` later will generate the correct base URI. There's probably a better way to do this but I get confused thinking it through. This came up while working on adding support for draft 2019-09, which has [tests][2] that caused issues. That's where I pulled these tests from. [0]: https://github.com/davishmcclurg/json_schemer/blob/c33c1b91ca831c01270cd7d14f927b8727022dee/lib/json_schemer/schema/base.rb#L137 [1]: https://github.com/davishmcclurg/json_schemer/blob/c33c1b91ca831c01270cd7d14f927b8727022dee/lib/json_schemer/schema/base.rb#L340 [2]: https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/b069ac352c3dc1fae71f6f177dafe97001c97920/tests/draft2019-09/refRemote.json#L101-L160
- Loading branch information
1 parent
85a3afa
commit 5e957a9
Showing
2 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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