Skip to content

fix: re-pin openapi generator to 3.1-native 7.12.0 and guard codegen in CI#1

Closed
Kyzgor wants to merge 1 commit into
mainfrom
codegen/repin-generator-3.1
Closed

fix: re-pin openapi generator to 3.1-native 7.12.0 and guard codegen in CI#1
Kyzgor wants to merge 1 commit into
mainfrom
codegen/repin-generator-3.1

Conversation

@Kyzgor

@Kyzgor Kyzgor commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Internal CI-verification PR for the Stage-1 codegen fix (lever B for permitio#130) before the upstream PR.

What changes

  • openapitools.json: generator pin 6.2.1 -> 7.12.0 (first 3.1-native line that types the spec).
  • scripts/check-codegen.mjs: codegen guard — regenerates from a pinned 3.1.0 fixture through the real pipeline, fails if any type collapses to all-any (allow-listing the 2 known residual files).
  • src/tests/codegen/fixtures/openapi-3.1.0.json: the pinned fixture.
  • .github/workflows/ci.yaml: a separate Java-provisioned codegen-guard job.

Scope: src/openapi/ is intentionally frozen (PATCH; no consumer breaks). Re-baselining the generated client is a separate change.

Purpose of this PR: confirm the codegen-guard job runs green in the real CI environment (setup-java provisioning, Maven download, separate-job wiring) before opening the upstream PR.

…in CI

The pinned generator 6.2.1 cannot read the OpenAPI 3.1.0 spec served at
api.permit.io: it regenerates an all-`any`, type-erased client (247 of 319 type
files) yet exits 0, masked by --skip-validate-spec. Running
`yarn generate-openapi-client` today silently replaces the typed client with `any`.

Re-pin the generator to 7.12.0, the first 3.1-native line that regenerates a typed
client (named properties instead of `any`; 2 known allOf+default residuals remain,
allow-listed and tracked for the re-baseline), and add a CI codegen guard that
regenerates from a pinned 3.1.0 fixture through the real pipeline and fails if any
type collapses to all-`any`. The guard runs in its own Java-provisioned job, off
the test suite.

The committed client under src/openapi/ is intentionally left unchanged: this
restores and guards the toolchain. Re-baselining the generated client against the
current spec is a separate, larger follow-up.

Fixes permitio#130
@Kyzgor Kyzgor force-pushed the codegen/repin-generator-3.1 branch from ec781cd to 4993c34 Compare June 29, 2026 21:22
@Kyzgor Kyzgor closed this Jun 30, 2026
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.

1 participant