yaml.schema incorrectly flags property
See original GitHub issueMy coc-settings.json file has the following setting:
{
"yaml.schemas": {}
}
That’s not a typo. I do not have any yaml schemas configured in my coc-settings.json file.
The Problem
When I edit a yaml file in .semaphore/deploy.yml
, coc-yaml flags all the top-level properties as invalid with the following message:
[yaml-schema: https://raw.githubusercontent.com/deployphp/deployer/master/src/schema.json] [E] Property version is not allowed.
Why is coc-yaml pulling a schema from deployphp/deployer? This doesn’t happen for all yaml files.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Visual Studio Code showing error: Property Stages is not ...
Basically VSCode is trying to detect the yml schema, and in my case, it's using something from delivery.org. So adding this config comment...
Read more >Validation schema of config.yaml - RAPIDS
yaml , for example PIDS , has a corresponding entry in the schema where we can validate its type, possible values, required properties,...
Read more >API Reference | Ajv JSON schema validator
Properties not defined in the schema will not be included in serialized JSON, unless the schema has additionalProperties: true flag.
Read more >Contribute to the CI/CD Schema - GitLab Docs
Although the CI/CD configuration file is written in YAML, it is converted into JSON by using monaco-yaml before it is validated by the...
Read more >Descriptor Format of Catalog Entities
Entity descriptor YAML files are not supposed to contain a status root key. Instead, catalog processors analyze the entity descriptor data and its...
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 FreeTop 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
Top GitHub Comments
This seems to be an issue with how https://www.schemastore.org/api/json/catalog.json is parsed.
GitHub Workflow
has.github/workflows/**.yml
defined but if your file ends indeploy.yml
, it’s caught first byDeployer Recipe
Appreciate this issue has been open for a while, found it whilst googling as I have the same problem.
I have a GCP
cloudbuild.yaml
file that I just could not get the LSP to point the right schema at, because it ended inbuild.yaml
it kept pointing the hammerkit schema at it. ¯_(ツ)_/¯I am just adding that the latest release of the language server has nothing about this in their changelog so I suspect it’s not been fixed. In any case, I have found a workaround that suits me:
I disable the schema store in my global config:
"yaml.schemaStore.enable": false
Then do the mapping as normal in local:Hope this helps anyone else who might still have the issue.