Skip to content

Suggestion: CI check for API schema drift on swagger spec #23067

@infracore

Description

@infracore

Context

v2.15.0 introduced a proxy cache regression (#23025) that broke Docker pulls for users relying on the v2 API contract. Separately, #23059 flagged Docker v2 API access issues and #23065 noted a deprecated endpoint.

These are the kinds of changes that a schema diff in CI can catch before they ship — response structure changes, removed fields, and endpoint deprecations surfaced automatically in PR review.

Suggestion

Add an API schema check to PRs that modify api/v2.0/swagger.yaml. A single workflow file:

name: API Schema Check
on:
  pull_request:
    paths:
      - 'api/v2.0/**'
permissions:
  contents: read
  pull-requests: write
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: delimit-ai/delimit-action@v1
        with:
          spec: api/v2.0/swagger.yaml

This diffs the base branch spec against the PR and posts a comment identifying breaking vs non-breaking changes with semver classification. Advisory only — never blocks merges. Teams can upgrade to enforcement later.

The action detects 27 change types (endpoint removal, type changes, required parameter additions, enum value removals, etc.) and generates migration guidance for each breaking change.

Zero config, no API keys, runs in under 30 seconds. Live demo with 23 breaking changes.

Happy to open a PR if there's interest.

Metadata

Metadata

Labels

github_actionsPull requests that update GitHub Actions code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions