We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 927fbf8 commit 0f933d3Copy full SHA for 0f933d3
tests/test_canonicalise.py
@@ -558,3 +558,19 @@ def test_validators_use_proper_draft():
558
}
559
cc = canonicalish(schema)
560
jsonschema.validators.validator_for(cc).check_schema(cc)
561
+
562
563
+def test_reference_resolver_issue_65_regression():
564
+ schema = {
565
+ "allOf": [{"$ref": "#/definitions/ref"}, {"required": ["foo"]}],
566
+ "properties": {"foo": {}},
567
+ "definitions": {"ref": {"maxProperties": 1}},
568
+ "type": "object",
569
+ }
570
+ res = resolve_all_refs(schema)
571
+ can = canonicalish(res)
572
+ assert "$ref" not in res
573
+ assert "$ref" not in can
574
+ for s in (schema, res, can):
575
+ with pytest.raises(jsonschema.ValidationError):
576
+ jsonschema.validate({}, s)
0 commit comments