Improve message error for "oneOf" element when several schemas are possible

Open
#60 7 comments 1 reaction 1 assignee View on GitHub

@aeschli is already working on this.

Since Nov 12, 2020.

Assessment

This issue has not been assessed yet.

Description

feature-request

Currently, if several schemas are possible a validation warning is provided:
Matches multiple schemas when only one must validate.

https://github.com/microsoft/vscode-json-languageservice/blob/fad098244642100e5054dedefed9da905b24aedc/src/parser/jsonParser.ts#L454-L459

I can be wrong but it seems a possible case. it is causing a false-positive in UI.
I think that it would be nice to validate against the various potential schemas and if one is matching, to not throw the validation.

Does it sounds reasonable?

Or it is the schema should never hit this case. In this case, how to avoid that in a clean way on schema side?

Dominant language
TypeScript
Stars
326
Forks
145
Avg merge
22h 10m
Merged PRs (30d)
9

Contributor guide

No contributing guide indexed for this repository

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.

More from microsoft/vscode-json-languageservice

All issues in microsoft/vscode-json-languageservice

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.