Search docs

Docs search
Back to Rule Catalog
AP-API-001API

OpenAPI contract exists

Checks that an OpenAPI contract is present for REST API review.

errorsetup-gapNo auto-fix

How to fix

  1. Generate or restore the OpenAPI contract.
  2. Update the configured contract path if the file moved.
  3. Commit the contract or generated artifact according to your team workflow.

What it means

ArchPilot expected an OpenAPI contract but could not find the configured contract artifact.

Why it matters

API contracts let teams review external behavior and catch API drift before consumers are surprised.

Common causes

  • The OpenAPI file was never generated.
  • The contract path changed.
  • The API is REST-based but contract generation is not wired into the repo.

Example bad pattern

REST controllers exist but contracts/openapi.yaml is missing.

Example good pattern

contracts/openapi.yaml is generated and reviewed with API changes.

Related files/config

  • contracts/openapi.yaml
  • .archpilot/architecture.json

Related CLI commands

  • archpilot validate
  • archpilot validate --ci
AP-API-001 - OpenAPI contract exists | ArchPilot Docs