Skip to content
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

Property apiVersion is not allowed. #1014

Closed
chesha1 opened this issue Mar 19, 2024 · 1 comment
Closed

Property apiVersion is not allowed. #1014

chesha1 opened this issue Mar 19, 2024 · 1 comment
Milestone

Comments

@chesha1
Copy link

chesha1 commented Mar 19, 2024

The following content with file name deploy.yaml produces this bug.

apiVersion: apps/v1
kind: Deployment

It says, Property apiVersion is not allowed.yaml-schema: Deployer Recipe

When the file is renamed, the error notification disappears.

Darwin arm64 23.2.0, vscode version 1.87.2

@mackenzie1
Copy link

mackenzie1 commented Mar 21, 2024

Due to a schema issue, VSCode is trying to detect the yml schema and it can't. See stackoverflow.

Three options:
1- Rename the file to deploy-xyz.yaml.
2- Add a config comment at the top of the file # yaml-language-server: $schema='none'.
3- Add the association to settings.json { "files.associations": { "**/*.yml": "updateMe" } }

@chesha1 chesha1 closed this as completed Mar 25, 2024
@mohitsuman mohitsuman added this to the 1.15.0 milestone Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants