Skip to content

Commit fa6db22

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. Also default string arrays to the empty array.
1 parent 0512e51 commit fa6db22

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

schema.json

Lines changed: 5 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",
@@ -64,22 +65,19 @@
6465
"default": {},
6566
"multipleOf": {
6667
"type": "number",
67-
"minimum": 0,
68-
"exclusiveMinimum": true
68+
"exclusiveMinimum": 0
6969
},
7070
"maximum": {
7171
"type": "number"
7272
},
7373
"exclusiveMaximum": {
74-
"type": "boolean",
75-
"default": false
74+
"type": ["number", "boolean"]
7675
},
7776
"minimum": {
7877
"type": "number"
7978
},
8079
"exclusiveMinimum": {
81-
"type": "boolean",
82-
"default": false
80+
"type": ["number", "boolean"]
8381
},
8482
"maxLength": { "$ref": "#/definitions/positiveInteger" },
8583
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
@@ -165,10 +163,6 @@
165163
"oneOf": { "$ref": "#/definitions/schemaArray" },
166164
"not": { "$ref": "#" }
167165
},
168-
"dependencies": {
169-
"exclusiveMaximum": [ "maximum" ],
170-
"exclusiveMinimum": [ "minimum" ]
171-
},
172166
"not": {
173167
"properties": {
174168
"$ref": {}

0 commit comments

Comments
 (0)