redocly-cli-cookbook icon indicating copy to clipboard operation
redocly-cli-cookbook copied to clipboard

spec-compliant-ruleset: which version of the spec?

Open alxndrsn opened this issue 2 months ago • 1 comments

The spec-compliant-ruleset at https://github.com/Redocly/redocly-cli-cookbook/tree/main/rulesets/spec-compliant (introduced in https://github.com/Redocly/redocly-cli-cookbook/pull/12) looks really useful.

One thing it seems to be missing is saying which version of the spec it aims to comply with.

The explanation links for each rule point to the latest URLs of the spec (https://spec.openapis.org/oas/latest.html). This is currently v3.0.2. But at the time of PR creation, the current version of the spec was 3.1.0 (https://spec.openapis.org/oas/v3.1.0.html).

alxndrsn avatar Oct 25 '25 07:10 alxndrsn

It should adjust to the spec version in the document you're linting, as the built-in rules are spec-aware.

If you're interested in following specifications, you might find the built-in spec ruleset useful as well. It's even more broad as it covers OpenAPI 2 and 3 (including the latest 3.2), AsyncAPI 2 and 3, Arazzo and more. You can use it just by running redocly lint openapi.yaml --extends spec or configure the redocly.yaml config file appropriately and build your own ruleset on top of it.

Please let me know if you need any assistance with that.

tatomyr avatar Oct 27 '25 18:10 tatomyr