-
Notifications
You must be signed in to change notification settings - Fork 261
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
yaml.schemas priority is lower than schemaStore #250
Comments
@JPinkney do you have pointers to improve that? I was looking to
this.filePatternAssociations so don't understand how it is built.We would need having 2 lists? one from schemastore and one from yaml.schemas? Maybe also need to differentiate the languageSettings.schemas yaml-language-server/src/server.ts Line 162 in d65a753
|
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 redhat-developer/vscode-yaml#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. |
Hi @gorkem , I have somewhat similar problem. There is some schema in the store that matches everything with the keyword "deploy". The store also have specific match for filetype "ui5-deploy.yaml", which is the schema i want to be used. |
This issue should be fixed in 0.14.0! yaml.schemas should not have a higher priority than the schemaStore. If there are still any issues please let me know. @idoprz Can you please open a separate issue with that info when you get a chance. As of 0.14.0 all schemas coming from the same source are equally valid regardless of whether they are an exact match or matched with a glob pattern |
@JPinkney This issue is still happening. |
Still reproducible. |
I 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
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.The text was updated successfully, but these errors were encountered: