Skip to content

dbowling/null-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

null-schema

A JSON schema that allows everything.

Why is this needed?

The RedHat YAML Language Support extension on VSCode does not have the option to enable the JSON Schema Store and also disable JSON Schema validation (e.g. there is no "none" option in the extension.)

I ran into an issue where my Kyverno policy files would trigger an incorrect JSON Scheme. []Setting the schema to none was suggested](redhat-developer/vscode-yaml#768 (comment)), but this caused the error Unable to load schema from '/none': No content. in my linter.

If the extension won't provide a "none" option, we can point it to a valid schema that allows all valid properties--a null schema.

Usage

In your settings.json for VSCode, add the null-schema to your yaml.schemas configuration, along with an appropriate glob for your use case. This will override any ill-suited schemas from the JSON Schema Store.

"yaml.schemas": {    
  "https://raw.githubusercontent.com/dbowling/null-schema/refs/heads/main/null.schema.json": [
    "**/kyverno/**/*"   
  ]
}

Community discussion

The following is a list of some of the community discussions around the issue:

About

A JSON schema that allows everything.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published