oas2-api-schemes
OpenAPI host "schemes" must be present and non-empty array.
- Applies to
schemes- Selects
$- Function
schema- Specs
- OpenAPI 2.0
Use it
This rule ships with OpenLint in spectral:oas. Extending the ruleset turns it on:
extends: spectral:oas
rules:
oas2-api-schemes: warn # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
oas2-api-schemes:
description: OpenAPI host "schemes" must be present and non-empty array.
recommended: true
formats:
- OpenAPI 2.0 (Swagger)
given: $
then:
field: schemes
function: schema
functionOptions:
dialect: draft7
schema:
items:
type: string
minItems: 1
type: array
About this rule
OpenAPI host schemes must be present and non-empty array.