[300] Add tests for valid use of empty fragments in "$id"
"valid": false
}
]
+ },
+ {
+ "description": "Valid use of empty fragments in location-independent $id",
+ "comment": "These are allowed but discouraged",
+ "schema": {
+ "$ref": "https://json-schema.org/draft/2019-09/schema"
+ },
+ "tests": [
+ {
+ "description": "Identifier name with absolute URI",
+ "data": {
+ "$ref": "http://localhost:1234/bar",
+ "$defs": {
+ "A": {
+ "$id": "http://localhost:1234/bar#",
+ "type": "integer"
+ }
+ }
+ },
+ "valid": true
+ },
+ {
+ "description": "Identifier name with base URI change in subschema",
+ "data": {
+ "$id": "http://localhost:1234/root",
+ "$ref": "http://localhost:1234/nested.json#/$defs/B",
+ "$defs": {
+ "A": {
+ "$id": "nested.json",
+ "$defs": {
+ "B": {
+ "$id": "#",
+ "type": "integer"
+ }
+ }
+ }
+ }
+ },
+ "valid": true
+ }
+ ]
}
]
