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 b17f02f

Browse files
further specify the format of iri-references throughout
- $id cannot have a fragment at all, so separate it from the common definiiion - $ref, $dynamicRef, $recursiveRef must be a iri-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 IRIs/iri-references: either there is no fragment, or it is non-empty and encodes a json pointer Also fixed the output schema which erroneously still identifies absoluteSchemaLocation as a uri, not an iri.
1 parent 2c70d2e commit b17f02f

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
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/iriReferenceString",
13+
"type": "string",
14+
"format": "iri-reference",
1415
"$comment": "Non-empty fragments not allowed.",
1516
"pattern": "^[^#]*#?$"
1617
},
1718
"$schema": { "$ref": "#/$defs/iriString" },
18-
"$ref": { "$ref": "#/$defs/iriReferenceString" },
19+
"$ref": { "$ref": "#/$defs/iriReferenceToSchemaString" },
1920
"$anchor": { "$ref": "#/$defs/anchorString" },
20-
"$dynamicRef": { "$ref": "#/$defs/iriReferenceString" },
21+
"$dynamicRef": { "$ref": "#/$defs/iriReferenceToSchemaString" },
2122
"$dynamicAnchor": { "$ref": "#/$defs/anchorString" },
2223
"$vocabulary": {
2324
"type": "object",
@@ -43,9 +44,11 @@
4344
"type": "string",
4445
"format": "iri"
4546
},
46-
"iriReferenceString": {
47+
"iriReferenceToSchemaString": {
4748
"type": "string",
48-
"format": "iri-reference"
49+
"format": "iri-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": "iri",
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
},
5252
"$recursiveRef": {
5353
"$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
54-
"type": "string",
55-
"format": "uri-reference",
54+
"$ref": "meta/core#/$defs/iriReferenceToSchemaString",
5655
"deprecated": true
5756
}
5857
}

0 commit comments

Comments
(0)

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