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

Consider Shipping Newer JSONSchema Version #704

Open
DavidArchibald opened this issue Feb 27, 2022 · 9 comments
Open

Consider Shipping Newer JSONSchema Version #704

DavidArchibald opened this issue Feb 27, 2022 · 9 comments
Labels

Comments

@DavidArchibald
Copy link

As the README says:

YAML Language support uses JSON Schemas to understand the shape of a YAML file, including its value sets, defaults and descriptions. The schema support is shipped with JSON Schema Draft 7.

I would love to use features from a newer draft (specifically I'm looking at unevaluatedProperties though a lot of it is good). So shipping with the ability to use 2020-12 would be great! I tried looking around to see if there's any way to configure it to ship with a newer version or a reason why it would be, say, backwards incompatible and thus not implemented.

I tried searching the issues with the keyword jsonschema etc. so I hope this isn't a duplicate issue or answered somewhere obvious!

@gorkem
Copy link
Collaborator

gorkem commented Feb 27, 2022

This extension inherits JSON schema support from vscode-json-language-service. I think it is best to follow up on this issue or similar ones for this support.

@DavidArchibald
Copy link
Author

Thank you for the swift reply! My apologies I was unsure if it was an upstream issue or not so thank you for the clarification.

@RomuAdq
Copy link

RomuAdq commented Dec 8, 2022

The unevaluatedProperties seems to work in JSON schema but not in yaml schema...
Any idea of the problem ?

@DetachHead
Copy link

that issue has been fixed but this extension still does not seem to support unevaluatedProperties

@pvanderlinden
Copy link

This extension inherits JSON schema support from vscode-json-language-service. I think it is best to follow up on this issue or similar ones for this support.

@gorkem The upstream issue is resolved a while ago. But it still doesn't work for this plugin. Are there any plans to resolve this?

@shuebner
Copy link

shuebner commented Jul 3, 2024

@gorkem When will this be resolved?

@gorkem
Copy link
Collaborator

gorkem commented Jul 3, 2024

Unfortunately, I am not actively working on it.

@jimfdavies
Copy link

jimfdavies commented Dec 19, 2024

Support in vscode-yaml for JSON Schema draft 2020-12 would make a huge difference for us. We use JSON Schema to build out frontend forms and backend validation and use also YAML as an input format edited in VSCode.

Amongst the draft 2020-12 features we would like YAML validation support for is dependentRequired.
https://json-schema.org/understanding-json-schema/reference/conditionals#dependentRequired
It's really handy for generating GUI forms and our VSCode YAML users should have the same benefits.

Latest draft support may also address the annoying 'problem' message: The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator when specifying "$schema": "https://json-schema.org/draft/2020-12/schema".
That upstream schema does indeed contain $dynamicRef and rightly so.

To confirm, the VSCode native JSON support does provide inline validation of 2020-12 keywords.

Our teams love this extension and as far as I know no other extension provides these excellent features.
It's a shame to see it slip behind.

@UnleashSpirit
Copy link

Hi,
Same here trying to use "prefixItems" and not working as expected cause it's a 2019/2020 draft feature and we still lock in past time with draft07 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants