Matchup

Hand-written SDK vs OpenAPI Generator

The oldest question in SDK work: write it yourself, or generate it from the API description with the open-source standard. Hand-written code wins on control and polish; generation wins on reach and keeping up.

vs
Criteria

Tick what matters. ×2 counts a criterion double.

Verdict

OpenAPI Generator wins, 10 to 8, narrowly, over Hand-written SDK.

Hand-written SDK 8/18 OpenAPI Generator 10/18

Hand-written SDK takes auth handling and pagination. OpenAPI Generator takes language support and maintenance. Even on typing and retries.

CriterionHand-written SDKOpenAPI Generator
Language supportEdge: OpenAPI GeneratorPartial

Each language is a separate codebase someone has to write and staff, so coverage is usually limited to the few languages the team knows best.

Strong

It ships client generators for dozens of languages and frameworks. Quality and completeness vary by generator, so check the one you need.

Check: OpenAPI Generator: generators list
TypingEvenSolid

Types can be as idiomatic as the authors make them, but they are written by hand and can drift from the API as it changes.

Solid

Typed models come from the schemas in your description. How well unions (oneOf), enums and nullables come through depends on the language's generator.

Check: OpenAPI Generator: generators list
Auth handlingEdge: Hand-written SDKStrong

Full control: any flow, including OAuth token refresh and custom signing, can be built exactly as the API needs it.

Solid

Security schemes in the description (API key, basic, bearer, OAuth) become configuration on the client. Token refresh is usually yours to build.

Check: OpenAPI Generator: generators list
RetriesEvenPartial

Retries exist only if someone built them, language by language. Check each SDK's source; behaviour often differs between languages.

Partial

Retry behaviour mostly comes from the HTTP library the generated client uses; you configure it, and it differs by generator.

Check: OpenAPI Generator: generators list
PaginationEdge: Hand-written SDKPartial

Paging helpers are possible and often nice, but each one is written by hand for each language and each list endpoint.

Weak

OpenAPI has no standard pagination keyword, so generated clients return one page per call and callers write the loop.

MaintenanceEdge: OpenAPI GeneratorWeak

Every new endpoint, field and deprecation is hand work in every language, and the SDKs drift from the API when that work slips.

Solid

Regenerate from the description when the API changes. Custom templates and patches have to be carried forward across generator upgrades.

The verdict, and when to ignore it

OpenAPI Generator wins, 10 to 8, narrowly, over Hand-written SDK. Hand-written SDK takes auth handling and pagination. OpenAPI Generator takes language support and maintenance. Even on typing and retries.

Pick Hand-written SDK when

You support one or two languages, your API has unusual flows (streaming, custom signing, long-running jobs) and you have engineers who want to own the SDK as a product.

Pick OpenAPI Generator when

You need many languages, your OpenAPI description is accurate, and you can live with each generator's defaults or are ready to maintain custom templates.

openapi-generator.tech