Skip to main content

incomplete-spec

Requires openapi, an object info, at least one path, and at least one non-health path.

AttributeValue
CategoryMetadata
MaturityBaseline
OpenAPISwagger 2.0; OpenAPI 3.0, 3.1, 3.2
StarterOff
Lenient–CompleteError

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:

  • openapi is missing or blank;
  • info is not an object;
  • no paths are parsed; or
  • the only paths are exactly /health and /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.