-
-
Notifications
You must be signed in to change notification settings - Fork 356
provide defaults for all keywords and subschemas that lacked them #1006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
9eef7bf
7060428
3ea4c02
a33ef8f
b5ab09f
5553c05
677f20a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,12 +51,12 @@ | |
| "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, | ||
| "uniqueItems": { | ||
| "type": "boolean", | ||
| "default": false | ||
| "$comment": "default: false" | ||
| }, | ||
| "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, | ||
| "minContains": { | ||
| "$ref": "#/$defs/nonNegativeInteger", | ||
| "default": 1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should stay There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we're okay with using "default" totally contradictory to the spec? If this is here purely for humans, it should be in a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this use is contradictory to the spec, because the spec defines
I had the same thought at first, but I've come to the conclusion that just because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm in agreement with this. We should consider other applications beyond just being used with an instance, the most obvious, to me, being writing schemas by hand or using UI tools (in terms of adding these for the meta schema). |
||
| "$comment": "default: 1" | ||
| }, | ||
| "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, | ||
| "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, | ||
|
|
@@ -74,8 +74,7 @@ | |
| "minimum": 0 | ||
| }, | ||
| "nonNegativeIntegerDefault0": { | ||
| "$ref": "#/$defs/nonNegativeInteger", | ||
| "default": 0 | ||
| "$ref": "#/$defs/nonNegativeInteger" | ||
| }, | ||
| "simpleTypes": { | ||
| "enum": [ | ||
|
|
@@ -91,8 +90,7 @@ | |
| "stringArray": { | ||
| "type": "array", | ||
| "items": { "type": "string" }, | ||
| "uniqueItems": true, | ||
| "default": [] | ||
| "uniqueItems": true | ||
| } | ||
| } | ||
| } | ||