oas3-schema
Validate structure of OpenAPI v3 specification.
- Applies to
document- Selects
$- Function
oasDocumentSchema- Specs
- OpenAPI 3.0OpenAPI 3.1OpenAPI 3.2
- Message
{{error}}.
Use it
This rule ships with OpenLint in spectral:oas. Extending the ruleset turns it on:
extends: spectral:oas
rules:
oas3-schema: error # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
oas3-schema:
description: Validate structure of OpenAPI v3 specification.
message: '{{error}}.'
severity: 0
recommended: true
formats:
- OpenAPI 3.x
given: $
resolved: false
then:
function: oasDocumentSchema
About this rule
Validate structure of OpenAPI v3 specification.
If OpenAPI 3.1 or 3.2 is used, jsonSchemaDialect is not respected and the draft 2020-12 is applied.
If you define your own jsonSchemaDialect, you’ll most likely want to disable this rule.