Reports and Exit Codes
Each linted specification receives a console summary and a detailed report.
Target: specs/orders.yaml
Maturity Level: Silver
Errors: 0, Warnings: 3, Ignored: 1
Status: PASSED
When several specifications are linted, Specmatic also prints aggregate totals.
Report formats
JSON is the default:
docker run --rm \
-v "$(pwd):/usr/src/app" \
-w /usr/src/app \
specmatic/enterprise \
lint specs/orders.yaml
Generate HTML instead:
docker run --rm \
-v "$(pwd):/usr/src/app" \
-w /usr/src/app \
specmatic/enterprise \
lint specs/orders.yaml --format=html
Reports are written below the directory containing the linter configuration:
build/reports/specmatic/lint/openapi/
Filename pattern:
lint-report-<specification-name>.json
lint-report-<specification-name>.html
The command prints each exact report path.
Problem details
Reports identify:
- rule ID and category;
- severity and message;
- source file and JSON Pointer;
- line and column when available;
- related source location when applicable;
- suggested fixes and reference link when supplied; and
- required maturity level.
Exit codes
| Code | Meaning | CI result |
|---|---|---|
0 | No error-level violations | Pass |
1 | One or more error-level violations | Fail |
2 | Invalid command input or configuration | Fail |
Warnings do not fail the command. This supports gradual adoption: introduce a rule as warn, resolve existing findings, then change it to error.
Measure execution time
docker run --rm \
-v "$(pwd):/usr/src/app" \
-w /usr/src/app \
specmatic/enterprise \
lint "specs/*.yaml" --time
--time prints elapsed time per target and for the complete run.