Is there a JsonSchema for the JSON/Yaml rulesets? #2666
Replies: 1 comment
-
|
If I'm not mistaken, what you mean can be found here: It seems to validate against the example here. The only problem is that it is referenced (and references) as a local file (presumably for when spectral is installed from npm). That means adding it to an arbitrary yaml/json file via On the other hand, building a full schema out of those files and submitting it schema store shouldn't be too hard a task.. PS: I'd also find this useful. 😊 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m looking to improve my (YAML) ruleset writing experience, and auto-completion would be nice.
Applying a JsonSchema to YAML file is easy in VSCode and provide some sort of autocompletion.
Does such a schema already exist ?
I started experimenting with one, trying to autogenerate one from the spectral/core interfaces and type, but the result is sub-optimal. I think hand-writing a schema could result in something decent but would require more work and would need to be kept in sync when/if the ruleset syntax change.
Such a schema could be registered in schema store.org to be automatically applied on
.spectral.jsonand.spectral.ymlfiles on supported IDEsWould this be of interest?
Beta Was this translation helpful? Give feedback.
All reactions