Skip to content

Commit 4aec366

Browse files
committed
Meta-schema exclusive* and default string array
Change the exclusiveMinimum|Maximum (and the one usage within the meta-schema) to allow numbers. Remove the default as the boolean form is a SHOULD NOT and there is no default for numeric limits. Add "examples", which I apparently forgot to do when I did the spec change. Also default string arrays to the empty array.
1 parent 0512e51 commit 4aec366

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

schema.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"stringArray": {
4343
"type": "array",
4444
"items": { "type": "string" },
45-
"uniqueItems": true
45+
"uniqueItems": true,
46+
"default": []
4647
},
4748
"schemaObject": {
4849
"type": "object",
@@ -62,24 +63,25 @@
6263
"type": "string"
6364
},
6465
"default": {},
66+
"examples": {
67+
"type": "array",
68+
"items": {}
69+
},
6570
"multipleOf": {
6671
"type": "number",
67-
"minimum": 0,
68-
"exclusiveMinimum": true
72+
"exclusiveMinimum": 0
6973
},
7074
"maximum": {
7175
"type": "number"
7276
},
7377
"exclusiveMaximum": {
74-
"type": "boolean",
75-
"default": false
78+
"type": ["number", "boolean"]
7679
},
7780
"minimum": {
7881
"type": "number"
7982
},
8083
"exclusiveMinimum": {
81-
"type": "boolean",
82-
"default": false
84+
"type": ["number", "boolean"]
8385
},
8486
"maxLength": { "$ref": "#/definitions/positiveInteger" },
8587
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
@@ -165,10 +167,6 @@
165167
"oneOf": { "$ref": "#/definitions/schemaArray" },
166168
"not": { "$ref": "#" }
167169
},
168-
"dependencies": {
169-
"exclusiveMaximum": [ "maximum" ],
170-
"exclusiveMinimum": [ "minimum" ]
171-
},
172170
"not": {
173171
"properties": {
174172
"$ref": {}

0 commit comments

Comments
 (0)