diff --git a/meta/core.json b/meta/core.json index dfc092d9..13f812ea 100644 --- a/meta/core.json +++ b/meta/core.json @@ -10,14 +10,15 @@ "type": ["object", "boolean"], "properties": { "$id": { - "$ref": "#/$defs/uriReferenceString", + "type": "string", + "format": "uri-reference", "$comment": "Non-empty fragments not allowed.", "pattern": "^[^#]*#?$" }, "$schema": { "$ref": "#/$defs/uriString" }, - "$ref": { "$ref": "#/$defs/uriReferenceString" }, + "$ref": { "$ref": "#/$defs/uriReferenceToSchemaString" }, "$anchor": { "$ref": "#/$defs/anchorString" }, - "$dynamicRef": { "$ref": "#/$defs/uriReferenceString" }, + "$dynamicRef": { "$ref": "#/$defs/uriReferenceToSchemaString" }, "$dynamicAnchor": { "$ref": "#/$defs/anchorString" }, "$vocabulary": { "type": "object", @@ -43,9 +44,11 @@ "type": "string", "format": "uri" }, - "uriReferenceString": { + "uriReferenceToSchemaString": { "type": "string", - "format": "uri-reference" + "format": "uri-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 1eef288a..40b5cb84 100644 --- a/output/schema.json +++ b/output/schema.json @@ -19,7 +19,9 @@ }, "absoluteKeywordLocation": { "type": "string", - "format": "uri" + "format": "uri", + "$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 d5e2d31c..a8a7b0ac 100644 --- a/schema.json +++ b/schema.json @@ -51,7 +51,7 @@ }, "$recursiveRef": { "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".", - "$ref": "meta/core#/$defs/uriReferenceString", + "$ref": "meta/core#/$defs/uriReferenceToSchemaString", "deprecated": true } }