Skip to content

Releases: mnahkies/openapi-code-generator

v0.22.0

02 Nov 13:05
206e789

Choose a tag to compare

What's Changed

This is a pretty significant release, with two larger features:

  • Support for Zod V4, whilst retaining support for Zod V3
  • Support for projects using ESM, and use import type where possible

Aside from this, we've made efforts to improve supply chain security 🔒

  • Adopted trusted publishers / Github Actions to publish releases
  • Added a minimum release age of 7 days for dependencies
  • Removed unmaintained dependency

As well as improving the CI setup to run integration and e2e tests across more variants to reduce risk of regressions 🧪

⚠️ Breaking Changes

  • --schema-builder defaults to zod-v4
  • --schema-builder no longer accepts zod, you must specify either zod-v3 or zod-v4 as required for your project

Full changes

Full Changelog: v0.21.1...v0.22.0

v0.22.0-alpha.0

26 Oct 16:40
8bee335

Choose a tag to compare

v0.22.0-alpha.0 Pre-release
Pre-release

What's Changed

This is a pretty significant release, with two larger features:

  • Support for Zod V4, whilst retaining support for Zod V3
  • Support for projects using ESM, and use import type where possible

As such it's being made available as an alpha release for further regression testing: https://www.npmjs.com/package/@nahkies/openapi-code-generator/v/0.22.0-alpha.0

Aside from this, we've made efforts to improve supply chain security 🔒

  • Adopted trusted publishers / Github Actions to publish releases
  • Added a minimum release age of 7 days for dependencies
  • Removed unmaintained dependency

As well as improving the CI setup to run integration and e2e tests across more variants to reduce risk of regressions.

⚠️ Breaking Changes

  • --schema-builder defaults to zod-v4
  • --schema-builder no longer accepts zod, you must specify either zod-v3 or zod-v4 as required for your project

Full details:

Full Changelog: v0.21.1...v0.22.0-alpha.0

v0.21.1

13 Aug 19:53

Choose a tag to compare

What's Changed

Bug fix release for #360 / #361 - previously nullable string schemas with a default of null would instead default to the string "null" - thanks @geuben!

Bug Fixes

  • fix: coercion of null default values by @geuben in #360
  • fix: joi supports string values with null default by @mnahkies in #361

Misc

New Contributors

Full Changelog: v0.21.0...v0.21.1

v0.21.0

26 Jul 12:54

Choose a tag to compare

What's Changed

This is a bigger than normal release, and contains a number of potentially breaking changes - however in general, these are making it clearer when the code generator doesn't support something properly (eg: it was probably already broken).

The primary changes are:

  • Unsupported Content-Type will now generate never as their typescript type
  • HTML form data submissions (application/x-www-form-urlencoded) are now supported
  • text/plain request bodies are also now supported
  • The CLI will auto-detect your formatter (biome/prettier) config and then use that config / formatter during code generation
  • Boolean schemas can now include an enum to restrict them to literal true or false
  • Server urls now allow "required" variables/placeholders

As well as several minor bug fixes, and maintenance chores. Most notably switching to pnpm which will hopefully help prevent issues with missing dependencies or misaligned peer dependencies in future.

Features

Bug Fixes

  • fix: adjust typing to reflect that boolean request headers are supported by @mnahkies in #339
  • fix: partial koa-body middlware options by @mnahkies in #346
  • fix: filter invalid request bodies by @mnahkies in #348
  • chore: switch to pnpm and fix peer dependencies by @mnahkies in #345
  • fix: improve request body / content-type handling by @mnahkies in #349
  • fix: serialize scim json bodies by @mnahkies in #355

Misc

Full Changelog: v0.20.1...v0.21.0

v0.20.1

31 May 11:42

Choose a tag to compare

What's Changed

This is a bug fix release that fixes some edge cases and adds compatibility with NodeJS v24.

Bug fixes

  • fix: array schema output order by @mnahkies in #329
  • fix: error if route placeholder present without matching path parameter by @mnahkies in #331
  • fix: fetch proxy compatible with node 24 by @mnahkies in #333

Misc

Full Changelog: v0.20.0...v0.20.1

v0.20.0

05 May 14:01

Choose a tag to compare

What's Changed

The main feature in this release is a new typescript-express server generation template. Its very similar in function to the typescript-koa template, but allows use of the express middleware ecosystem.

See the documentation here: https://openapi-code-generator.nahkies.co.nz/guides/server-templates/typescript-express

There was also some improvements of the availability of "escape hatches", namely you can now return a SkipResponse symbol to bypass the normal response validation and sending, allowing your handler full control over this.

Features

Bug Fixes

  • fix: don't export aliases if name is ApiClient by @mnahkies in #319
  • fix: wrap response validation errors when using joi by @mnahkies in #323

Misc

Full Changelog: v0.19.2...v0.20.0

v0.19.2

19 Apr 11:22

Choose a tag to compare

What's Changed

Another attempt to solve running by npx

Bug fixes

Full Changelog: v0.19.1...v0.19.2

v0.19.1

18 Apr 12:07

Choose a tag to compare

What's Changed

Hopefully resolves being able to run via npx without issues.

Bug fixes

Full Changelog: v0.19.0...v0.19.1

v0.19.0

18 Apr 11:46

Choose a tag to compare

What's Changed

The headline feature, and potentially breaking change, is safer enum evolution. You can read more about it on the documentation site here: https://openapi-code-generator.nahkies.co.nz/guides/concepts/enums

Otherwise included some minor bug fixes to joi schema generation, and misc testing improvements.

Features

Bug fixes

Docs

  • feat: add an interactive playground to the documentation site by @mnahkies in #216
  • feat(docs): upgrade to nextra 4 by @mnahkies in #301

Misc

  • chore: refresh deps / data by @mnahkies in #294
  • chore(deps): update all dependencies by @renovate in #293
  • chore(deps): update dependency koa to v2.15.4 [security] by @renovate in #296
  • chore(deps): update dependency axios to v1.8.2 [security] by @renovate in #300
  • chore: deps / refresh data by @mnahkies in #302
  • chore(deps): update all dependencies by @renovate in #295
  • chore(deps): update dependency next to v15.2.3 [security] by @renovate in #303
  • chore(deps): update dependency next to v15.2.4 [security] by @renovate in #305
  • chore(deps): update all dependencies by @renovate in #304
  • refactor: normalizeSchemaObject is a instance method of input by @mnahkies in #306
  • fix: paths to openapi specifications by @mnahkies in #307
  • chore(deps): update dependency koa to v2.16.1 [security] by @renovate in #308
  • chore: upgrade dependencies and roadmap by @mnahkies in #312

Full Changelog: v0.18.0...v0.19.0

v0.18.0

22 Dec 11:21

Choose a tag to compare

What's Changed

Primarily a bug-fix release focusing on improving client SDK runtime validation.

POTENTIALLY BREAKING CHANGES

  • Users of joi validation must change the dependency from @hapi/joi to joi
  • Unused Res and StatusCode types removed from typescript-axios-runtime package
  • TypedFetchResponse removed from typescript-fetch-runtime package, use exported type Res instead if needed

Bug fixes

  • feat(typescript-fetch)!: simplify response types by @mnahkies in #280
  • fix(typescript-axios)!: remove unused exports by @mnahkies in #281
  • fix(joi)!: switch from @hapi/joi to joi by @mnahkies in #284
  • fix: intersected union schemas by @mnahkies in #283
  • fix(typescript-fetch): runtime validation works by @mnahkies in #287
  • fix(client-sdks): handle 204 empty responses with runtime validation by @mnahkies in #288

Misc

Full Changelog: v0.17.0...v0.18.0