incomplete-spec
Requires openapi, an object info, at least one path, and at least one non-health path.
| Attribute | Value |
|---|---|
| Category | Metadata |
| Maturity | Baseline |
| OpenAPI | Swagger 2.0; OpenAPI 3.0, 3.1, 3.2 |
| Starter | Off |
| Lenient–Complete | Error |
Intent
A useful API contract needs version metadata, descriptive metadata, and at least one business operation surface.
Flags
The document once when any condition holds:
openapiis missing or blank;infois not an object;- no paths are parsed; or
- the only paths are exactly
/healthand/health/info.
Does not flag
A document satisfying all four checks. The rule checks field presence and broad structure, not whether each path contains an operation.
See it fail
openapi: 3.0.3
info:
title: Payments API
version: 1.0.0
paths:
/health:
get:
responses:
'200': {description: OK}
The document contains operational health only, with no business path.
Fix it
Add at least one business path:
paths:
/payments:
get:
responses:
'200': {description: OK}
Configure
profiles:
default:
rules:
extends: [recommended]
override:
incomplete-spec: warn
:::caution Swagger 2.0
The current implementation specifically requires an openapi field. A Swagger 2.0 document uses swagger instead, so disable this rule for Swagger 2.0 inputs.
:::
Nearby: path-declaration-must-exist, api-info-title-description.