-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
How do I configure a schema that uses a "bundle" format? #64
Comments
May be unrelated to coc-yaml: |
The "$ref" in the error message looks like a URL encoded string for
Something along the way is not decoding the URL properly and causing the issue, since subschemas seem to work properly (no errors and stuff like "hover", etc. does work), when specifying directly a modline like this: # yaml-language-server: $schema=https://raw.githubusercontent.com/ansible/schemas/main/f/ansible.json#/$defs/tasks However, overriding the glob mapping in the {
"yaml.schemas": {
"https://raw.githubusercontent.com/ansible/schemas/main/f/ansible.json#/$defs/tasks": [
"**/tasks/*.yml",
"**/tasks/*.yaml",
"**/handlers/*.yml",
"**/handlers/*.yaml"
]
} |
@jguedez same problem with the coc-settings. Nothing seems to work for me excepting the comment in all yaml files. |
Found the solution... Setup Coc with "yaml.schemas": {
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/tasks.json": [
"**/tasks/*.yml",
"**/tasks/*.yaml",
"**/handlers/*.yml",
"**/handlers/*.yaml"
]
} |
See here: https://github.com/ansible/schemas#schema-bundle
The Ansible schemas have migrated to using this new bundle format but coc-yaml cannot seem to resolve the schema in this format.
I have my
yaml.schemas
configured as they suggest in the linked documentation:For the filetypes in the image above that use the non-bundle format (ansible-meta, ansible-vars), the schema works just fine, but the bundle ones (lines 114, 115) i get the errors above.
Can coc-yaml resolve these types of URLs?
The text was updated successfully, but these errors were encountered: