Installs @stoplight/spectral-cli into the CI image, and uses it to
validate the Swagger API spec against the Swagger 2.0 schema.
^codedocs/doxygen\.conf$
^docs/depfile\.py$
^docs/http-api/tsigkey\.rst$
+^docs/http-api/swagger/spectral-ruleset\.yaml$
^docs/lua-records/reference/index\.rst$
^modules/remotebackend/example\.rb$
^modules/remotebackend/test-remotebackend-keys\.hh$
required: true
description: The length of the network prefix
- name: view
- type: string
required: true
description: The name of the view to use for to this network
in: body
--- /dev/null
+extends: ["spectral:oas"]
@task
def install_swagger_tools(c):
+ c.run('npm install -g @stoplight/spectral-cli')
c.run('npm install -g api-spec-converter')
@task
def swagger_syntax_check(c):
+ c.run('spectral lint --ruleset docs/http-api/swagger/spectral-ruleset.yaml --fail-severity error --display-only-failures docs/http-api/swagger/authoritative-api-swagger.yaml')
c.run('api-spec-converter docs/http-api/swagger/authoritative-api-swagger.yaml -f swagger_2 -t openapi_3 -s json -c')
@task