Skip to content

API spec diffing alongside DB schema diffing #6549

Description

@infracore

Is your feature request related to a problem? Please describe.

I noticed you have a nice schema-diff workflow (.github/workflows/schema-diff.yml) that catches DB schema changes on PRs by diffing functions, tables, views, triggers, indexes, and constraints. But the API spec at internal/gen/controller.swagger.json — 144 endpoints, 243 definitions, all generated from protobuf — doesn't have an equivalent check.

Since the swagger is generated from proto definitions, a field rename or type change in a .proto file silently propagates into the API spec without any PR-level visibility. For a project where downstream consumers (Terraform provider, SDKs, enterprise integrations) depend on API stability, it seems like the same approach you use for DB diffs would be valuable for the API surface.

Describe the solution you'd like

Something similar to what schema-diff.yml does, but for controller.swagger.json — diff the generated spec against the base branch on each PR and post a comment showing added/removed/changed endpoints or response schemas.

Describe alternatives you've considered

There are a few open-source tools that can do this: oasdiff, openapi-diff, or Delimit (a GitHub Action I built at github.com/delimit-ai/delimit-action that classifies changes as breaking vs non-breaking). Any of these could slot into a workflow similar to your existing schema-diff pattern.

Explain any additional use-cases

This would be especially useful for the Boundary Terraform provider and any SDK generators consuming the swagger spec — they'd get early warning when a PR changes the API contract.

Additional context

The existing schema-diff.yml pattern is a great foundation. The API version diffing could follow the same PR-comment approach.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions