redhat-developer / redhat-developer/vscode-yaml

validate doesn't flag unknown fields

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

Nobody has claimed this yet.

enhancement good first issue
Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

I've created a schema, and while the plugin will suggest to me fields, and flag when I add the wrong types for know fields,

it does NOT flag if I add random new fields / wrongly named fields to the doc.

Is there a strict setting or something similar?

currently it's very easy to name a field like numbr instead of number and get no warning

also the actual suggestion ctrl-space seems to not suggest a lot of stuff.

is there a way to run a "validate" command to flag all the problems?
I do see some issues come up in the Problems panel while editing, but only while I'm in the middle of typing and the data is in incomplete / editing mode. As soon as it's finished all my bugs/mitsakes get ignored.

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

Start by reproducing the schema validation behavior in VS Code, including the Problems panel after a document is complete and the Ctrl-Space suggestions. Review the existing validation and completion entry points, then define whether the scope covers unknown-field diagnostics, a strict setting, and a validate command. Done means the agreed behavior is covered by tests and works on completed YAML documents.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode, yaml
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.