Skip to content

openapi/stale-document

Runs openapi.generate_command and fails when the document changes.

Part of the openapi configuration, at the recommended level. It runs at the push stage, once per scope. It runs the command in openapi.generate_command. It skips until you set openapi.generate_command.

A committed document that lags the routes describes a service that does not exist.

Run the command and commit the document it writes.

A committed document that differs from the generator output reports drift. Run the generator, review the change, and commit it.

Turn it off for some files, or one of its lint rules, with a reason:

gspot ignore openapi/stale-document --paths "<glob>" --reason "<why>"
gspot ignore openapi/stale-document --rule <rule> --reason "<why>"