Zuplo CLI: Lint
- Applies to
- Gatewayruntime for API, AI, and MCP gateways
- Hosting
- Managed EdgeManaged DedicatedSelf-Hosted
zuplo lint checks the OpenAPI files in your project's config/ directory and
config/policies.json for missing fields, undefined policies, invalid policy
options, and Zuplo conventions. It runs locally and doesn't need an API key. See
Linting your API for an overview of what it checks.
The command reads its settings from zuplo.lint.jsonc (or zuplo.lint.json)
in the project directory.
See Lint configuration for presets,
rule severities, required policies, and breaking change detection.
Exit codes
| Code | Meaning |
|---|---|
0 | No results at or above the failure threshold. |
1 | The linter found results at or above the failure threshold. |
2 | The linter couldn't run: the directory isn't a Zuplo project, or the configuration file is invalid. |
Common use cases
Lint before you commit
Code
Apply automatic fixes
--fix adds missing operationId values and removes empty inbound policy
arrays, then reports what's left. See
Fix problems automatically.
Code
List the rules you can use
Code
Add --format json for machine-readable output.
Lint in CI
Code
See Lint in CI/CD for GitHub Actions workflows, including code scanning, and Breaking change detection for comparing your API against a Git branch.
Examples
Lint the project in the current directory
Apply the fixes that can be made automatically
Fail the command on warnings as well as errors
Emit SARIF for GitHub Code Scanning
List the rules you can configure
Options
--dir
The directory containing your Zuplo API
stringDefault: "."--config
Path to a lint config file. Defaults to zuplo.lint.jsonc or zuplo.lint.json in the project directory.
string--format
Output format
stringDefault: "text"Choices: text, json, sarif--fail-on
Severity threshold that fails the command. Defaults to the failOn value in your lint config, or 'error'.
stringChoices: error, warn, none--fix
Rewrite your OpenAPI files to fix what can be fixed automatically, then report what is left
booleanDefault: false--list-rules
List every rule a config can use, with its default severity and the rulesets that include it. Use --format json for machine-readable output.
booleanDefault: falseGlobal options
The following global options are available for all commands:
Additional resources
- Linting your API
- Lint configuration
- Lint rules reference
- Lint in CI/CD
- Custom lint rules
- Breaking change detection