Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With default values now having implication for both assertions
and annotation collection (see PR #600 for this), it no longer
makes sense to have a default value for subschemas.
Keywords such as
additionalProperties
now collect annotationinformation based on the instance properties to which thier
subschema(s) are applied. This means that a subschema of true
will cause a property to appear in the annotation, while an
absent subschema will not. Therefore, a default of true does
not match the annotation collection behavior and is not accurate.
Additionally, as written this has always been problematic, as
it claims a default true value for
not
, which would in factcause all schemas without
not
to fail.However, the Hyper-Schema LDO schema keywords do have
reasonable defaults:
A resource is assumed to provide or accept any structure as its
representation, accept any structure for processing if it does processing
at all, and to allow any header usage. So targetSchema, submissionSchema,
and headerSchema all default to true.
However, by default, URI templates may not be resolved from input,
so headerSchema defaults to false.