Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 22c5cd1

Browse files
further specify the format of uri-references throughout
- $id cannot have a fragment at all, so separate it from the common definiiion - $ref, $dynamicRef, $recursiveRef must be a uri-reference to a schema location: when the fragment is non-empty, it must refer to an $anchor or a json-pointer - absoluteKeywordLocation in result outputs must use canonical URIs/uri-references: either there is no fragment, or it is non-empty and encodes a json pointer
1 parent 0e08f03 commit 22c5cd1

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

‎meta/core.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
"type": ["object", "boolean"],
1111
"properties": {
1212
"$id": {
13-
"$ref": "#/$defs/uriReferenceString",
13+
"type": "string",
14+
"format": "uri-reference",
1415
"$comment": "Non-empty fragments not allowed.",
1516
"pattern": "^[^#]*#?$"
1617
},
1718
"$schema": { "$ref": "#/$defs/uriString" },
18-
"$ref": { "$ref": "#/$defs/uriReferenceString" },
19+
"$ref": { "$ref": "#/$defs/uriReferenceToSchemaString" },
1920
"$anchor": { "$ref": "#/$defs/anchorString" },
20-
"$dynamicRef": { "$ref": "#/$defs/uriReferenceString" },
21+
"$dynamicRef": { "$ref": "#/$defs/uriReferenceToSchemaString" },
2122
"$dynamicAnchor": { "$ref": "#/$defs/anchorString" },
2223
"$vocabulary": {
2324
"type": "object",
@@ -43,9 +44,11 @@
4344
"type": "string",
4445
"format": "uri"
4546
},
46-
"uriReferenceString": {
47+
"uriReferenceToSchemaString": {
4748
"type": "string",
48-
"format": "uri-reference"
49+
"format": "uri-reference",
50+
"$comment": "any fragment must be empty, or match anchor or json-pointer syntax",
51+
"pattern": "^[^#]*(|#([A-Za-z_][-A-Za-z0-9.:_]*|/([^~]|~[01])*))$"
4952
}
5053
}
5154
}

‎output/schema.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
},
2020
"absoluteKeywordLocation": {
2121
"type": "string",
22-
"format": "uri"
22+
"format": "uri",
23+
"$comment": "any fragment must be non-empty, and use json-pointer syntax",
24+
"pattern": "^[^#]*(#/([^~]|~[01])*)$"
2325
},
2426
"instanceLocation": {
2527
"type": "string",

‎schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
},
5252
"$recursiveRef": {
5353
"$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
54-
"$ref": "meta/core#/$defs/uriReferenceString",
54+
"$ref": "meta/core#/$defs/uriReferenceToSchemaString",
5555
"deprecated": true
5656
}
5757
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /