diff --git a/meta/core.json b/meta/core.json index 087ebd37..99c1e015 100644 --- a/meta/core.json +++ b/meta/core.json @@ -10,14 +10,15 @@ "type": ["object", "boolean"], "properties": { "$id": { - "$ref": "#/$defs/iriReferenceString", + "type": "string", + "format": "iri-reference", "$comment": "Non-empty fragments not allowed.", "pattern": "^[^#]*#?$" }, "$schema": { "$ref": "#/$defs/iriString" }, - "$ref": { "$ref": "#/$defs/iriReferenceString" }, + "$ref": { "$ref": "#/$defs/iriReferenceToSchemaString" }, "$anchor": { "$ref": "#/$defs/anchorString" }, - "$dynamicRef": { "$ref": "#/$defs/iriReferenceString" }, + "$dynamicRef": { "$ref": "#/$defs/iriReferenceToSchemaString" }, "$dynamicAnchor": { "$ref": "#/$defs/anchorString" }, "$vocabulary": { "type": "object", @@ -43,9 +44,11 @@ "type": "string", "format": "iri" }, - "iriReferenceString": { + "iriReferenceToSchemaString": { "type": "string", - "format": "iri-reference" + "format": "iri-reference", + "$comment": "any fragment must be empty, or match anchor or json-pointer syntax", + "pattern": "^[^#]*(#([A-Za-z_][-A-Za-z0-9.:_]*|/([^~]|~[01])*))?$" } } } diff --git a/output/schema.json b/output/schema.json index 72551fc6..5635e543 100644 --- a/output/schema.json +++ b/output/schema.json @@ -19,7 +19,9 @@ }, "absoluteKeywordLocation": { "type": "string", - "format": "uri" + "format": "iri", + "$comment": "any fragment must be non-empty, and use json-pointer syntax", + "pattern": "^[^#]*(#(/([^~]|~[01])*)*)?$" }, "instanceLocation": { "type": "string", diff --git a/schema.json b/schema.json index 066d86b9..c1ff2379 100644 --- a/schema.json +++ b/schema.json @@ -51,8 +51,7 @@ }, "$recursiveRef": { "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".", - "type": "string", - "format": "uri-reference", + "$ref": "meta/core#/$defs/iriReferenceToSchemaString", "deprecated": true } }