Skip to content

Commit 240221c

Browse files
refactor(schema): remove type when enum defined (#1042)
If ruby code uses the "type" to decide the type, then this turns this optional keyword in json schema into a mandatory one. Remove "type" from JSON schema when "enum" present. fixes #1016 Signed-off-by: Kevin Broch <[email protected]>
1 parent 6c99b1f commit 240221c

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

spec/schemas/proc_cert_class_schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"description": "Descriptive name of the class"
2121
},
2222
"processor_kind": {
23-
"type": "string",
2423
"enum": ["Generic Unprivileged", "Microcontroller", "Apps Processor"],
2524
"description": "What kind of class is this?"
2625
},

spec/schemas/proc_cert_model_schema.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
"description": "List of semantic versions within the model"
9494
},
9595
"base": {
96-
"type": "integer",
9796
"enum": [32, 64],
9897
"description": "Base of the model"
9998
},
@@ -140,7 +139,6 @@
140139
"in_scope_priv_modes": {
141140
"type": "array",
142141
"items": {
143-
"type": "string",
144142
"enum": ["M", "S", "U", "HS", "VS", "VU"]
145143
},
146144
"uniqueItems": true,

spec/schemas/profile_family_schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"const": "profile family"
1111
},
1212
"processor_kind": {
13-
"type": "string",
1413
"enum": ["Generic Unprivileged", "Microcontroller", "Apps Processor"],
1514
"description": "What kind of processor is this?"
1615
},

0 commit comments

Comments
 (0)