Skip to content

Compare effective schemas in oasdiff (flatten-allof)#53

Merged
turegjorup merged 3 commits into
developfrom
ci/oasdiff-flatten-allof
Jul 8, 2026
Merged

Compare effective schemas in oasdiff (flatten-allof)#53
turegjorup merged 3 commits into
developfrom
ci/oasdiff-flatten-allof

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Enables flatten-allof: true on both oasdiff steps in the API-spec workflow.

Changes

  • .github/workflows/api-spec.yml: add flatten-allof: true to the breaking and changelog steps.

Why — and an honest note on scope

flatten-allof compares the effective (flattened) schema, so an allOf/$ref restructure isn't misreported as removed properties. This is the class of noise the 4.1→4.3 upgrade produced (7× "removed required hydra:member" etc. from the new HydraCollectionBaseSchema).

I verified empirically against the real 4.1→4.3 spec diff:

errors warnings
without flatten 70 84
with flatten 113 0

So it does eliminate the ~98 allOf artifacts — but it does not reduce the gate to near-zero: the 4.1→4.3 error-schema widenings (nullable/type changes) remain and even expand once the effective schemas are compared field-by-field. Those are real, and that entire diff is a merged one-off — going forward every comparison is 4.3-vs-4.3, so the allOf-mismatch class can't recur regardless of this flag.

Net: this is forward-looking hygiene (robustness against future API Platform schema restructures), not a fix for a present problem. It's low-risk — flatten-allof never masks a real breaking change; it only changes how structurally-refactored-but-equivalent schemas are compared.

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).
@codecov-commenter

codecov-commenter commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.99%. Comparing base (191e1ed) to head (977a675).
⚠️ Report is 15 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #53   +/-   ##
==========================================
  Coverage      72.99%   72.99%           
  Complexity       232      232           
==========================================
  Files             29       29           
  Lines            648      648           
==========================================
  Hits             473      473           
  Misses           175      175           
Flag Coverage Δ
unittests 72.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@turegjorup turegjorup self-assigned this Jul 8, 2026
@turegjorup turegjorup merged commit 04a5a2e into develop Jul 8, 2026
11 checks passed
@turegjorup turegjorup deleted the ci/oasdiff-flatten-allof branch July 8, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants