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 validating an OpenAPI spec that uses Mutual TLS, spectral lint, spectral reports that mutualTLS is not a viable security scheme. Mutual TLS support was added to Open API 3.1.
Run the command: spectral lint {path-to}/api.json --ruleset {path-to}/.spectral.json,
Observe the following output:
2451:15 error oas3-schema Invalid security scheme. components.securitySchemes.MutualTLS
2452:13 error oas3-schema "type" property must be equal to one of the allowed values: "apiKey", "http", "oauth2", "openIdConnect". components.securitySchemes.MutualTLS.type
Describe the bug When validating an OpenAPI spec that uses Mutual TLS,
spectral lint
, spectral reports thatmutualTLS
is not a viable security scheme. Mutual TLS support was added to Open API 3.1.To Reproduce
And an API spec that contains:
spectral lint {path-to}/api.json --ruleset {path-to}/.spectral.json
,Expected behavior Expected
mutualTLS
to be supported since it was added to OAS 3.1 here: https://github.com/OAI/OpenAPI-Specification/pull/1764