CLI: Lint Your Zuplo Project with zuplo lint

The Zuplo CLI now includes zuplo lint, which checks your project’s OpenAPI files and policies.json for errors and Zuplo conventions before you deploy. Run it from your project directory:

Terminalbash
npx zuplo lint

The linter reports problems such as missing operationId values, undefined path parameters, ambiguous paths, routes that reference policies not defined in policies.json, and invalid x-zuplo-route or policy options. It installs with the CLI as a platform-specific binary, so there is nothing extra to download and it works offline and in CI caches.

Fix what can be fixed automatically

zuplo lint --fix repairs the issues that have one correct answer: it adds missing operationId values derived from the method and path, and removes empty inbound policy arrays. Everything else, such as descriptions, tags, and required authentication policies, stays a reported violation for you to decide on. Fixes are minimal edits that preserve your file’s formatting, and files with nothing to fix are left untouched.

Run it in CI

The command exits with 1 when it finds violations and 2 when the linter itself can’t run, so your pipeline can tell the two apart. Use --fail-on to choose whether warnings fail the run, and --format json or --format sarif for machine-readable output, including GitHub Code Scanning:

Terminalbash
npx zuplo lint --fail-on warn --format sarif > results.sarif

To change rule severities, ignore paths, or pick a stricter preset, add a zuplo.lint.jsonc file to the project root.

Run only the tests you mark

zuplo test also gained an --only flag. Mark a test or suite with .only and run with --only to execute just the marked tests. Without the flag, .only has no effect and every test runs.

Terminalbash
npx zuplo test --endpoint http://localhost:9000 --only

Getting started

Update the zuplo package in your project to get both commands. See zuplo lint for every option and Get started with zuplo test for .only and --filter.