feat: add config to disable additional properties#499
Merged
evidolob merged 3 commits intoredhat-developer:masterfrom May 13, 2021
Merged
feat: add config to disable additional properties#499evidolob merged 3 commits intoredhat-developer:masterfrom
evidolob merged 3 commits intoredhat-developer:masterfrom
Conversation
evidolob
approved these changes
May 11, 2021
| "yaml.disableAdditionalProperties": { | ||
| "type": "boolean", | ||
| "default": false, | ||
| "description": "Globally set additionalProperties to false to all objects. So if its true, no extra properties are allowed inside yaml." |
Member
There was a problem hiding this comment.
Should "to false to all objects" be "to false for all objects"?
joshuawilson
approved these changes
May 12, 2021
bleach31
pushed a commit
to bleach31/vscode-yaml
that referenced
this pull request
Jan 25, 2022
* redhat-developer#371 Support relative path in inline schema comment Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * Fix test on windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Add
disableAdditionalPropertiesinto yaml configuration and if is set to true yaml validation won’t allow extra props that are not in schema (where type == 'object').What issues does this PR fix or reference?
redhat-developer/yaml-language-server#452 (comment)
Is it tested? How?
If is
disableAdditionalPropertiesset totrue, you can't put any extra object props into yaml.