Spec0docs
CLICommands

spec0 lint

Lint OpenAPI spec with Spectral

Auto-generated from spec0 commands --output=json. Do not edit by hand — changes are overwritten by npm run sync:cli-docs.

Usage

spec0 lint [spec-file] [options]

Arguments

namerequireddescription
spec-filenoPath to OpenAPI spec (or use --spec-file / global --spec-file)

Flags

flagdescriptiondefault
--spec-file <path>Path to OpenAPI spec file
--ruleset <file>Use custom ruleset file
--org-rulesetFetch org ruleset from server
--save-ruleset &lt;file&gt;Upload <file> as the org's stored Spectral ruleset (skips the lint step)
--format &lt;fmt&gt;Output: text, json, github, sariftext
--min-score &lt;n&gt;Exit 1 if score below n (0-100)0
--strictExit 1 on any warning

Exit codes

Stable contract — branch on these from CI and agents.

codemeaning
0success
1generic / unclassified failure
2usage error (bad flags, missing args)
3not authenticated (no token / token expired)
4permission denied (403)
5resource not found (404)
6conflict (409 — e.g. name already taken)
7validation failed (422 — e.g. spec below min score)
8rate limited (429)
9upstream server error (5xx)
10network error (unreachable, timeout)

See also

On this page