Skip to content
Commands

kubb validate

The validate command checks that a Swagger/OpenAPI document is valid without running the full pipeline.

Run kubb validate to check that a Swagger/OpenAPI document is valid without running the pipeline. Use it to catch errors early in CI or before you commit a spec change.

kubb validate ./petStore.yaml

The input can also be a URL, such as https://petstore3.swagger.io/api/v3/openapi.json.

Arguments

ArgumentRequiredDescription
<input>truePath or URL to the Swagger/OpenAPI document to validate.
kubb validate exits with a non-zero status code when the spec is invalid. Use it as a pre-commit hook or CI step to fail the build.

See also