redhat-developer / redhat-developer/vscode-yaml

Kubernetes schema parser conflicts with OpenAPI schema parser

Open
#474 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-info
Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

(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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the conflict by installing the listed YAML and OpenAPI extensions, then opening an OpenAPI specification in YAML format. Trace how the Kubernetes extension selects schemas and validation for that file; done means OpenAPI YAML is parsed without Kubernetes errors while Kubernetes YAML validation still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, typescript, yaml
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.