CICD-327 · OpenAPI schema validation
Encyclopedia · Advanced networking and API testing · All snippets
Previous · CICD-326 · Next · CICD-328
1. Where it fits
- Placement CI validation step.
- Prerequisites authorized test service, known endpoint or local fixture and the named test CLI.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
npx --no-install redocly lint openapi.yaml3. How it works
npx invokes the locally installed Redocly CLI and uses the project's chosen rules for the OpenAPI file. The no-install flag avoids silently fetching a different tool.
4. Verify the result
Pin the Redocly CLI in the project's dev dependencies and run npm ci first.
Validation syntax-validated (Bash parse). Status definitions.