From 34dc090d1f82af0357b515882b693a3ff8a9b77b Mon Sep 17 00:00:00 2001 From: infracore Date: Sun, 26 Apr 2026 17:54:35 -0400 Subject: [PATCH] ci: add API drift check on openapi.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds .github/workflows/api-schema-check.yml. Runs a structural diff on openapi.json against the PR base on every change, posts a comment when it sees a breaking change. Advisory-only; no fail-on, no required check. Sits next to validate_pr.yml: swagger-validator-v2 covers structural validity, this covers semantic drift (e.g. silent field renames in the response shape that pass structural validation but break SDK consumers). Concrete motivating finding: between commits c8d216f2 and 83610126, four field renames landed in POST /tag_groups.json 200 response (tag_names→tags, parent_tag_name→parent_tag) — both pairs structurally valid OpenAPI in both versions. Action pinned by commit SHA (afa76ce3...) rather than floating tag. --- .github/workflows/api-schema-check.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/api-schema-check.yml diff --git a/.github/workflows/api-schema-check.yml b/.github/workflows/api-schema-check.yml new file mode 100644 index 0000000..06c7267 --- /dev/null +++ b/.github/workflows/api-schema-check.yml @@ -0,0 +1,21 @@ +name: API Schema Check + +on: + pull_request: + paths: + - 'openapi.json' + +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@afa76ce3d1caa90a8de6bfd038471af672f60e90 # v1.11.3 + with: + spec: openapi.json