From d088d3910ced2d9b0d6dfc54da3160907dae353e Mon Sep 17 00:00:00 2001 From: turegjorup Date: Wed, 8 Jul 2026 16:16:09 +0200 Subject: [PATCH 1/2] ci: compare effective schemas in oasdiff (flatten-allof) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set flatten-allof: true on both oasdiff steps so an allOf/$ref restructure of the generated spec is compared as its effective schema rather than reported as removed properties. This is forward-looking hygiene: it makes the gate robust to future API Platform schema restructures like the 4.1→4.3 HydraCollectionBaseSchema change, and it never masks a real diff. It does not "clean up" the already-merged 4.1→4.3 diff (that error-schema widening is real and now behind us). --- .github/workflows/api-spec.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/api-spec.yml b/.github/workflows/api-spec.yml index 8204cf2..0e5bdd8 100644 --- a/.github/workflows/api-spec.yml +++ b/.github/workflows/api-spec.yml @@ -98,6 +98,9 @@ jobs: base: .api-spec-tmp/base.yaml revision: .api-spec-tmp/revision.yaml fail-on: ERR + # Compare effective (flattened) schemas so an allOf/$ref restructure is + # not reported as removed properties. Never masks real diffs. + flatten-allof: true # Upload to oasdiff.com to get a side-by-side review link (exposed as # the review_url output), but suppress the action's own comment with an # empty token — we post a single combined comment below. @@ -113,6 +116,7 @@ jobs: revision: .api-spec-tmp/revision.yaml format: markdown output-to-file: changelog.md + flatten-allof: true # As above: keep the upload/review_url output, suppress the auto-comment. review: true github-token: "" From ef1d46f03c88f8c8f6c9445662bb7ef73fe9629a Mon Sep 17 00:00:00 2001 From: turegjorup Date: Wed, 8 Jul 2026 16:16:33 +0200 Subject: [PATCH 2/2] docs: add CHANGELOG entry for oasdiff flatten-allof --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03d3236..9e20adf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] +- [PR-53](https://github.com/itk-dev/event-database-api/pull/53) + Compare effective schemas in the oasdiff gate (flatten-allof) so allOf/$ref restructures are not miscounted - [PR-51](https://github.com/itk-dev/event-database-api/pull/51) Show the API-spec diff summary inline in the PR comment (collapsed) alongside the oasdiff review link - [PR-49](https://github.com/itk-dev/event-database-api/pull/49)