stoplightio / spectral

A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI (v3.1, v3.0, and v2.0), Arazzo v1.0, as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.45k stars 235 forks source link

Add a built-in ruleset to validate Spectral ruleset #1853

Open dolmen opened 2 years ago

dolmen commented 2 years ago

User story. As a user, I would like to check that the ruleset I've written to use Spectral is valid.

Is your feature request related to a problem? As Spectral is a JSON/YAML validator and Spectral rulesets are written in JSON or YAML I would like to use Spectral for that task.

Describe the solution you'd like Add a built-in ruleset for Spectral ruleset like we have for OpenAPI and AsyncAPI.

Additional context

P0lip commented 2 years ago

Heyo! I agree. We probably wouldn't expose a ruleset, but a CLI command for that, i.e. spectral ruleset validate or alike. This would probably output errors in a similar way to spectral lint. I have some code somewhere that adds it, but haven't had enough time to get this over the finish line.