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.
Describe the bug
When openapi is wrapped in a object ( JSON or YAML), extends: [spectral:oas] is not able to be reused.
To Reproduce
Given this document,
spec attribute needs to comply with spectral:oas ruleset.
When i try to start the node js server, with the below rule,
I am getting the following error
RulesetValidationError: the rule must have at least "given" and "then" properties
Expected behavior
When a rule extends a certain rule set (as we have done for 'spectral:oas' for 'spec' attribute) for a given attribute, linting needs to be done for that attribute and corresponding linting responses needs to be provided. 'then' must be optional if 'extends' is provided.
Describe the bug When openapi is wrapped in a object ( JSON or YAML),
extends: [spectral:oas]
is not able to be reused.To Reproduce
Given this document,
spec
attribute needs to comply withspectral:oas
ruleset.When i try to start the node js server, with the below rule,
I am getting the following error
RulesetValidationError: the rule must have at least "given" and "then" properties
Expected behavior When a rule extends a certain rule set (as we have done for 'spectral:oas' for 'spec' attribute) for a given attribute, linting needs to be done for that attribute and corresponding linting responses needs to be provided. 'then' must be optional if 'extends' is provided.