Skip to content

feat!: regenerate the SDK from the enhanced generator - #82

Open
mridang wants to merge 26 commits into
mainfrom
feat/better-enhanced-sdks
Open

mridang wants to merge 26 commits into
mainfrom
feat/better-enhanced-sdks

Conversation

@mridang

@mridang mridang commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Regenerates the SDK from the enhanced openapi-generator-plus, with bespoke authenticators ported to the new interfaces and full unit + integration suites passing locally.

Closes #21
Closes #58

@mridang
mridang force-pushed the feat/better-enhanced-sdks branch from 06849e1 to fde8eea Compare June 13, 2026 11:28
@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Qodana for PHP

2 new problems were found

Inspection name Severity Problems
Undefined function 🔶 Warning 1
Redundant cast to string ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@mridang
mridang force-pushed the feat/better-enhanced-sdks branch 2 times, most recently from a17022e to 5b7276b Compare June 13, 2026 13:19
@mridang mridang changed the title feat: regenerate SDK from enhanced generator with ported authenticators feat!: regenerate the SDK from the enhanced generator Jun 13, 2026
@mridang
mridang force-pushed the feat/better-enhanced-sdks branch 9 times, most recently from bf254ab to ddf46c0 Compare June 14, 2026 13:59
@mridang
mridang requested a review from Copilot June 15, 2026 12:33
@mridang mridang self-assigned this Jun 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Regenerate the client from openapi-generator-plus with modernized
templates, authenticators ported to the new interfaces, and house
tooling aligned to the generator's output.

BREAKING CHANGE: new generated API surface, a raised minimum runtime,
and updated dependencies; not source-compatible with the prior release.
Reorganize .openapi-generator-ignore into the shared eight-section layout
and sort each section alphabetically. Also fix the facade to use the
generated TransportOptions constructor instead of the removed
::defaults() helper.
Move the bespoke auth tests, ZitadelTest, and fixtures from test/ into
tests/ so there is a single test root matching the generator's emitted
unit tests. Wire mrpunyapal/peststan into phpstan.neon and drop the
test-dir exclusion so the suite is now statically analysed.
@mridang
mridang force-pushed the feat/better-enhanced-sdks branch from ecb1b80 to 3c5cb98 Compare September 17, 2026 02:08
Regenerated with the local openapi-generator-plus:enhanced image. Behavior changes:

- operations declared security: [] now suppress the client authenticator (NoAuth
  sentinel) instead of sending the client credential
- selecting application/octet-stream on a multi-content-type upload sends the raw
  bytes rather than a multipart envelope
- type: number Decimal fields serialize as unquoted JSON numbers
- BOM-less charset=utf-16 response bodies decode big-endian per RFC 2781

The bespoke OAuthAuthenticator now constructs ApiException as (statusCode, message)
to match the regenerated cross-SDK constructor order.
Regenerated with the auth-fixed generator image. Operations that inherit
the spec's single global security requirement no longer pass the NoAuth
sentinel; they omit the auth argument so BaseApi falls back to the
client-level authenticator. NoAuth now appears only in BaseApi's own
resolution logic and the generated NoAuth class.
…pled test

The generated Api classes imported the NoAuth sentinel but never used it, since
every Zitadel operation inherits the global security requirement and so passes
no per-call auth override at all.

The generated Psr18 multipart test referenced PhotoMetadata, a model that only
exists in the generator's own petstore spec. That broke phpstan and the test
suite. The test now declares its model part locally, so it holds for any spec.
The generator lowercased only the first character of a camelCase identifier, so
names beginning with an acronym kept a stray run of capitals. The OIDC and SAML
service accessors and their request parameters now read correctly.

BREAKING CHANGE: oIDCService and sAMLService are renamed to oidcService and samlService.
Removes fixture vocabulary the templates had been carrying as literals. The
documentation referenced a petApi property and a Pet model this package has
never contained, and several tests named their fixtures after it. Those values
are now derived from the spec being generated, so they describe this SDK.

No public API changes: the remaining edits are comments and test fixture data.
Picks up the generated-documentation fixes. The examples previously described
APIs this package does not have: a RequestContext parameter no generator
emits, accessors under the wrong name, and error handling that could not run
as written.
The twelve generators had drifted into twelve dialects describing the same
SDK. Each sentence now has one wording across every language, varying only in
a token the language genuinely calls by another name.
The package manifest declared MIT beside an Apache-2.0 LICENSE file. It is
maintained by hand, so the generator could not correct it; it now declares
Apache-2.0, and proc.yml records the same for the generated metadata.
Adds the network and timeout errors, drops the one-off error types and
keeps the Zitadel root name through errorPrefix.
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.

Release SDK for V5 Fixed the messy auto-generated serde logic in the library

2 participants