question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yaml.schemas priority is lower than schemaStore

See original GitHub issue

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

"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:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
alex-kinokoncommented, Jul 5, 2021

Still reproducible.

2reactions
JPinkneycommented, Jul 15, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found