crescat-io/saloon-sdk-generator
Generate PHP SDKs from OpenAPI specs with Saloon. Turn API definitions into typed connectors, requests, and resources, reducing boilerplate and helping you ship consistent client libraries faster.
saloon-sdk-generator turns a maintained OpenAPI spec into a typed Saloon-based PHP SDK. The decision it unlocks is "do we hand-write and hand-maintain HTTP clients, DTOs, and auth wiring per integration, or do we generate them from a spec we already own?" For teams with more than one or two third-party integrations, generation typically wins on maintenance cost alone.^3.0|^4.0, which means we can pull the patched Saloon into existing SDKs without a coordinated rewrite. This is a "can we remediate the CVE without a roadmap slot?" answer — and the answer is yes.defaultAuth() (instead of getAuthenticator()) in multi-authenticator connectors aligns generated behavior with Saloon's intended override pattern and with single-authenticator connectors. This matters for products where a single integration supports multiple credential types — per-tenant API keys vs. OAuth, or user-scoped vs. app-scoped tokens — where inconsistent auth resolution produces exactly the kind of intermittent, hard-to-reproduce bug that burns support time.Adopt when most of the following hold:
Look elsewhere when:
composer global require, which is a supply-chain and reproducibility consideration for locked-down build environments.For executives: This is developer tooling, not a runtime dependency. It converts an OpenAPI spec into a maintained PHP SDK, which reduces the ongoing cost of every API integration we own and makes security patching of our HTTP layer a routine update instead of a project. The v1.6.0 release is a good example of the payoff: our HTTP client library (Saloon) shipped a security release addressing three CVEs, and this generator update lets our generated SDKs adopt the patched version without changing any code we've written. No functional API changes, no forced migration, no customer-visible behavior change.
For engineering: v1.6.0 widens the generated-SDK dependency constraint to ^3.0|^4.0 and upgrades the generator's own Saloon and Laravel-plugin dependencies to ^4.0. Saloon v4 is a security release only — generated SDKs behave identically on v3 and v4, so upgrading is a dependency-range change, not a code change. One item to verify before rolling out: multi-authenticator connectors now call defaultAuth() instead of getAuthenticator(). This is a correctness fix that brings them in line with single-authenticator connectors and Saloon's intended override pattern, but any connector with a custom authenticator override should be regenerated and smoke-tested — if a connector relied on the old resolution path, its auth behavior will change. Recommend pinning the generator version, regenerating into a branch, and diffing the output so the auth change is reviewed rather than absorbed silently.
Recommendation: Adopt v1.6.0. Low risk, clears a known CVE path, and the single behavioral change is scoped and reviewable.
How can I help you explore Laravel packages today?