-
Notifications
You must be signed in to change notification settings - Fork 234
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
Hammerkit yaml schema picked up instead of Github actions #565
Comments
Same issue. This wasn't happening a few months ago. |
Going to NOTE: the exact url has the correct certificate https://json.schemastore.org/github-action.json |
@andig Also the correct schema for Github workflows is this https://json.schemastore.org/github-workflow.json For now we can workaround this issue by putting this comment at the top of the yaml file
|
This issue happens on Linux too. On my side, the plugins says it’s using both My solution was to put, in "yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*"
} |
I‘m still confused as to why it would be doing this? |
JSON Schema Store’s API returns a list of schema with their If we look into it: {
"name": "Hammerkit YAML Schema",
"description": "JSON Schema for hammerkit files.",
"fileMatch": [
"build.yaml",
"build.yml"
],
"url": "https://json.schemastore.org/hammerkit.json"
} and {
"name": "GitHub Workflow",
"description": "YAML schema for GitHub Workflow",
"fileMatch": [
".github/workflows/**.yml",
".github/workflows/**.yaml"
],
"url": "https://json.schemastore.org/github-workflow.json"
}, There’s no clear way to determine which one should be used, even though it’s obvious for us human. This extension could:
|
@ariasuni You are right.
That how I plan to fix this. |
Explanation is in redhat-developer/vscode-yaml#565 (and the fundamental problem is ambiguity between schema selectors resulting in the wrong option being chosen; the workaround is to force an override)
It should be possible to determine which schema to use if you compare how specific the |
Describe the bug
I have
yaml.schemaStore.enable
active and work with github actions (yaml files in.github/workflows
. Editingbuild.yaml
I see error indicators.Expected Behavior
No errors as yaml validated based on https://json.schemastore.org/github-action.json
Current Behavior
Errors relating to https://json.schemastore.org/hammerkit.json
Steps to Reproduce
Not really sure. This may be a problem with any of the schema definitions rather than this plugin, but I couldn't figure it out.
Environment
The text was updated successfully, but these errors were encountered: