yaml.schemas priority is lower than schemaStore
See original GitHub issueI was trying to use vscode-yaml for ansible configuration recently, specifically this one schema http://json.schemastore.org/ansible-stable-2.9
but there’s a small bug where yum supports only string as input.
Afterwards I’ve added configuration to use custom schema
"settings": {
"yaml.schemas": {
"./ansible-stable-2.9-local.json": "*",
}
}
I guess that file loads properly, because on hover it gets proper description for properties and autocomplete, but validation not.
After I’ve added "yaml.schemaStore.enable": false,
to settings I am getting both hover information and rules from local file.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:7 (3 by maintainers)
Top Results From Across the Web
yaml-language-server
Supports JSON Schema 7 and below. ... schemaStore.enable : When set to true the YAML language server will ... Takes priority over editor....
Read more >How to configure YAML schema to make editing files easier
The biggest advantage is that it is completely transparent for the end user. To benefit from the JSON Schema store and the built-in...
Read more >2.0.0 | AsyncAPI Initiative for event-driven APIs
yaml . Schema. AsyncAPI Object. This is the root document object for the API specification. It combines resource listing and API declaration together...
Read more >gitlab-ci.yml schema broken for job:secrets (#345868) · Issues
Have a syntax validator using the current schema, e. g. IntelliJ (mine still uses the schema from JSON Schema Store which is materially...
Read more >YAML and KUBERNETES Plugin don't play well together
This is "A JSON schema for Deployer yaml recipes" automatically taken by the JSON plugin from www.schemastore.org and applied to a file named...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Still reproducible.
filePatternsAssociations stuff is all passed through to the JSON language service IIRC.
I think to fix this issue we need to introduce priorities for schemas like suggested. Something like https://github.com/redhat-developer/vscode-yaml/issues/151 should always be priority 1, meaning that if it is present, no matter what it will use it and nothing else.
Then I think local schemas can be priority 2, meaning any other local schemas can be matched with the file.
Then schema store schemas would be priority 3 and are only used if nothing else matches.