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.schema incorrectly flags property

See original GitHub issue

My 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:open
  • Created 3 years ago
  • Reactions:5
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
egyptianbmancommented, Feb 24, 2021

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 in deploy.yml, it’s caught first by Deployer Recipe

3reactions
daogilviecommented, Jul 12, 2021

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 in build.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:

  "yaml.schemas": {
    "http://json.schemastore.org/cloudbuild": ["cloudbuild.yaml"]
  }

Hope this helps anyone else who might still have the issue.

Read more comments on GitHub >

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

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