Let’s define some terminology:
A rules file is a YAML or JSON file containing an object with a rules
property, which is an array of rule objects.
There is a reserved require
property (type string
) at the top level, which can be used for ruleset chaining.
require: default
rules:
- name: openapi-tags
object: openapi
description: "openapi object should have non-empty tags array"
truthy: tags
- name: default-and-example-are-redundant
object: "*"
description: "don't need to define an example if its exactly the same as your default"
notEqual: ["default", "example"]
Since v0.9.0, Speccy uses oas-linter, which is part of oas-kit by Mike Ralphson.
See the full list of rule actions available to be used in your rulesets.