Skip to content

Commit

Permalink
Use absolute URI in meta data schema $ref.
Browse files Browse the repository at this point in the history
This fixes a test failure with jsonschema>=4.15.0. If "id" and "$ref" are
present at the same time, "id" is ignored in Draft4Validator. Because of this
a relative URI in "$ref" will not work, since there is no base URI to apply it
to.

Closes #58.
  • Loading branch information
avian2 committed Oct 22, 2022
1 parent 79398a4 commit 34baf66
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_jsonmerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1970,8 +1970,7 @@ def test_reference_in_meta(self):
schema = {'mergeStrategy': 'version'}

meta_schema = {
'id': 'http://example.com/schema_1.json',
'$ref': 'schema_2.json#/definitions/meta'
'$ref': 'http://example.com/schema_2.json#/definitions/meta'
}

schema_2 = {
Expand Down

0 comments on commit 34baf66

Please sign in to comment.