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.
Related Issue:
Description of changes:
This PR does three things:
dictionary.json
schemav?
prefix from the semver regex to disallow it in future schemasThe last bullet is a bit more complex:
additionalProperties: false
along with redeclaring the inherited properties ORunevaluatedProperties: false
.unevaluatedProperties
pattern, as it avoids redeclaring property names as in this PR, but I found that validation messages were wonky in the schema validation library I used.unevaluatedProperties
does not pass on any nested attribute of the inherited schema, it would flag the entire schema (rather than the attribute) as being wrong. e.g. in the semver issue I am fixing in this PR...unevaluatedProperties
would saydictionary.json
has unexpected attributeattributes
because a sub-sub-sub-sub.... schema ofattributes
did not passadditionalProperties
like in this PR will explicitly point to the field that is wrong:TL;DR
: while the new pattern in this PR is more verbose and repeats information, it produces much better error messages when schemas fail on validation, which I think is more important.