Skip to content

Commit 6c99b1f

Browse files
refactor: remove unneeded type in jsonschema when const defined (#1017)
Removes unnecessary "type" from schema definition when a "const" is declared. This prevents problem where code using the jsonschema makes the type mandatory like here: #636 fixes #1015 Signed-off-by: Kevin Broch <[email protected]>
1 parent 4ad6179 commit 6c99b1f

File tree

5 files changed

+0
-15
lines changed

5 files changed

+0
-15
lines changed

spec/schemas/proc_cert_class_schema.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name", "introduction"],
65
"additionalProperties": false,
76
"properties": {
87
"$schema": {
9-
"type": "string",
108
"const": "proc_cert_class_schema.json#"
119
},
1210
"kind": {
13-
"type": "string",
1411
"const": "processor certificate class"
1512
},
1613
"name": {

spec/schemas/proc_cert_model_schema.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name", "base"],
65
"additionalProperties": false,
@@ -54,11 +53,9 @@
5453
]
5554
},
5655
"$schema": {
57-
"type": "string",
5856
"const": "proc_cert_model_schema.json#"
5957
},
6058
"kind": {
61-
"type": "string",
6259
"const": "processor certificate model"
6360
},
6461
"name": {

spec/schemas/profile_family_schema.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name"],
65
"properties": {
76
"$schema": {
8-
"type": "string",
97
"const": "profile_family_schema.json#"
108
},
119
"kind": {
12-
"type": "string",
1310
"const": "profile family"
1411
},
1512
"processor_kind": {

spec/schemas/profile_release_schema.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name", "description"],
65
"properties": {
76
"$schema": {
8-
"type": "string",
97
"const": "profile_release_schema.json#"
108
},
119
"kind": {
12-
"type": "string",
1310
"const": "profile release"
1411
},
1512
"name": {

spec/schemas/profile_schema.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name", "base"],
65
"properties": {
76
"$schema": {
8-
"type": "string",
97
"const": "profile_schema.json#"
108
},
119
"kind": {
12-
"type": "string",
1310
"const": "profile"
1411
},
1512
"name": {

0 commit comments

Comments
 (0)