Skip to content

WPB-26627: introduce lint-openapi-regression - #5294

Draft
blackheaven wants to merge 10 commits into
developfrom
gdifolco/WPB-26627-check-api
Draft

blackheaven wants to merge 10 commits into
developfrom
gdifolco/WPB-26627-check-api

Conversation

@blackheaven

Copy link
Copy Markdown
Contributor

https://wearezeta.atlassian.net/browse/WPB-26627

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@blackheaven
blackheaven requested a review from a team as a code owner June 26, 2026 22:37
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jun 26, 2026
@blackheaven
blackheaven force-pushed the gdifolco/WPB-26627-check-api branch from 25445ad to a4e9942 Compare June 27, 2026 05:33
@blackheaven
blackheaven marked this pull request as draft June 29, 2026 09:12
@blackheaven
blackheaven force-pushed the gdifolco/WPB-26627-check-api branch 4 times, most recently from 34724fd to dcb08df Compare September 10, 2026 20:39
…rsion drift checks

Fetch a specific brig OpenAPI version over HTTP and lint it against the
saved baseline of that same version (actual VN vs saved VN):

- New LintOpenAPI.Baseline module: discoverBaselineFiles et al. moved
  from Main.hs; selectBaselineFile picks swagger-v<N>.json (fail-closed,
  OpenAPI-2 names rejected); expectVersion checks a spec's version from
  servers[0].url.
- Main.hs: --api-version N selects the single matching baseline
  (missing baseline, candidate version mismatch, or targeted-baseline
  parse failure all exit 2); warns that --ignore may mask drift.
- Makefile: openapi-lint-regression target fetches /vN/api/swagger.json
  (numeric VERSION guard) and lints it; deliberately no --ignore.
- README: option row, usage example, drift-masking caveat, exit codes.
@blackheaven
blackheaven force-pushed the gdifolco/WPB-26627-check-api branch from 4b4d2a0 to 00179db Compare October 12, 2026 16:00
@blackheaven
blackheaven force-pushed the gdifolco/WPB-26627-check-api branch from da04b57 to 4f19052 Compare October 14, 2026 15:44
Extract versionedSwagger from brig's liveSwagger into Wire.API.Routes.Public.Swagger
so the wire-api test suite can render the spec of every frozen version (v5-v18) and
compare it to services/brig/docs/swagger-v*.json via lint-openapi-regression. The
nix build splices the baselines into the sandbox src; per-version ignore files in
libs/wire-api/test/unit/ignore/ record already-accepted drift, and any violation on
a non-ignored route fails the compile job.
@blackheaven
blackheaven force-pushed the gdifolco/WPB-26627-check-api branch from 4f19052 to f5015c8 Compare October 14, 2026 15:45

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants