Skip to content

openapi

A committed OpenAPI document that passes its lint rules and matches what its generator writes.

Check Stage Level What it does
openapi/spectral commit recommended Lints the file in openapi.document with the Spectral OpenAPI rules.
openapi/stale-document push recommended Runs openapi.generate_command and fails when the document changes.
Setting What it sets
openapi.document The committed OpenAPI document, relative to the repository root, which init fills in when it finds one; without it, the OpenAPI checks do not run.
openapi.generate_command The command that writes the OpenAPI document from the code, run in the project scope folder.

gspot selects it in a scope with filenames openapi.yaml, openapi.yml, openapi.json, swagger.json, swagger.yaml.

Rule file Installed when
.gspot/configurations/infrastructure/openapi/rules/OPENAPI.md Always
Tool Version
spectral 6.15.0
ajv 8.20.0

gspot writes .gspot/configurations/infrastructure/openapi/spectral.yml.