vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Kubernetes schema parser conflicts with OpenAPI schema parser

Open tigerinus opened this issue 4 years ago • 2 comments

(originally opened in https://github.com/Azure/vscode-kubernetes-tools/issues/919)

Steps:

  1. Install https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml (v0.17.0)
  2. Install https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi (v4.3.1)
  3. Open a OpenAPI spec file in yaml format

Expect: the yaml file gets parsed correctly. Actual: yaml file gets picked up by Kubernetes extension and reports schema validation errors:

image

Workaround: Close the file and re-open, then the errors are gone.

-- Version: 1.55.0 (system setup) Commit: c185983a683d14c396952dd432459097bc7f757f Date: 2021-03-30T16:01:55.261Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042

tigerinus avatar Apr 07 '21 14:04 tigerinus

Do you have all the .yaml mapped to kubernetes on your settings as described on the readme for this repo? vscode-yaml does not do an auto-mapping between yaml files and a schema. It should be configured either by user as defined on the README of this repo or by another extension that is using the APIs from this one (in this case it can be vscode-kubernetes-tools)

gorkem avatar Apr 09 '21 16:04 gorkem

No, i did nothing other than installing these two extensions.

tigerinus avatar Apr 09 '21 18:04 tigerinus