Skip to content

Commit 340116e

Browse files
committed
Schema of specification in much structured
1 parent 003ac02 commit 340116e

File tree

2 files changed

+44
-8
lines changed

2 files changed

+44
-8
lines changed

test-schema.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@
3232
"description": "Location of the test case in the specification",
3333
"type": "object",
3434
"minProperties": 1,
35-
"properties":{
36-
"jsonschema": {"type": "string"},
37-
"rfc": {"type": "string"}
35+
"properties": {
36+
"jsonschema-core": { "$ref": "#/$defs/spec"},
37+
"jsonschema-validation": {"$ref": "#/$defs/spec"},
38+
"ecma262": { "$ref": "#/$defs/spec"}
39+
},
40+
"patternProperties": {
41+
"^rfc[0-9]{4}$": {"$ref": "#/$defs/spec"}
3842
},
3943
"additionalProperties": false
4044
}
@@ -66,6 +70,18 @@
6670
}
6771
},
6872
"additionalProperties": false
73+
},
74+
"spec": {
75+
"properties": {
76+
"section": {
77+
"type": "string",
78+
"pattern": "^\\d+(\\.\\d+)*\\.$"
79+
},
80+
"para": {
81+
"type": "string",
82+
"pattern": "^\\d+(\\.\\d+)*\\.$"
83+
}
84+
}
6985
}
7086
}
7187
}

tests/draft2020-12/additionalProperties.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"description":
44
"additionalProperties being false does not allow other properties",
55
"specification":{
6-
"jsonschema":"https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.3.2.3-1"
6+
"jsonschema-core": {
7+
"section": "10.3.2.3.",
8+
"para": "1"
9+
}
710
},
811
"schema": {
912
"$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -46,6 +49,11 @@
4649
},
4750
{
4851
"description": "non-ASCII pattern with additionalProperties",
52+
"specification":{
53+
"rfc8259":{
54+
"section": "4."
55+
}
56+
},
4957
"schema": {
5058
"$schema": "https://json-schema.org/draft/2020-12/schema",
5159
"patternProperties": {"^á": {}},
@@ -67,7 +75,10 @@
6775
{
6876
"description": "additionalProperties with schema",
6977
"specification":{
70-
"jsonschema":"https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.3.2.3-1"
78+
"jsonschema-core": {
79+
"section": "10.3.2.3.",
80+
"para": "1"
81+
}
7182
},
7283
"schema": {
7384
"$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -115,7 +126,10 @@
115126
{
116127
"description": "additionalProperties are allowed by default",
117128
"specification":{
118-
"jsonschema":"https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.3.2.3-5"
129+
"jsonschema-core": {
130+
"section": "10.3.2.3.",
131+
"para": "5"
132+
}
119133
},
120134
"schema": {
121135
"$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -132,7 +146,10 @@
132146
{
133147
"description": "additionalProperties does not look in applicators",
134148
"specification":{
135-
"jsonschema":"https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.2-2"
149+
"jsonschema-core": {
150+
"section": "10.2.",
151+
"para": "2"
152+
}
136153
},
137154
"schema": {
138155
"$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -152,7 +169,10 @@
152169
{
153170
"description": "additionalProperties with null valued instance properties",
154171
"specification":{
155-
"jsonschema": "https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.3.2.3-1"
172+
"jsonschema-core": {
173+
"section": "10.3.2.3.",
174+
"para": "1"
175+
}
156176
},
157177
"schema": {
158178
"$schema": "https://json-schema.org/draft/2020-12/schema",

0 commit comments

Comments
 (0)