Skip to content

Releases: mnahkies/openapi-code-generator

v0.20.1

31 May 11:42
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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

v0.17.0

11 Dec 07:16
Compare
Choose a tag to compare

What's Changed

The main change is that server overrides at the path / operation level will now be respected and create an additional positional parameter for these methods when generating clients (closes #266).

There was also a fix for client generation with --enable-runtime-response-validation, when the typescript project has exactOptionalPropertyTypes: true in its tsconfig.json

Additionally defaultHeaders is now optional in client configuration, and the HTTP head verb is now supported. The documentation got a few new pages including a roadmap, and some general tips on usage.

BREAKING CHANGES

  • New positional parameter on methods where server overrides are included in the specification
  • Unique export names for Angular services now suffixed with Service

Features

Bug Fixes

  • fix: support exactOptionalPropertyTypes on client SDKs by @mnahkies in #278
  • fix!: angular modules have unique export names by @mnahkies in #270

Docs

Misc

Full Changelog: v0.16.0...v0.17.0

v0.16.0

02 Nov 12:08
Compare
Choose a tag to compare

What's Changed

Client class exports will now be given unique names generated from the input specifications info.title field. This can additionally be overridden through a new cli arg --override-specification-title.

The previous generic exports are kept for backwards compatibility.

POTENTIALLY BREAKING: Filenames generated from tags or route prefixes will now follow kebab-case naming convention by default. This can be customized to other conventions like camel-case, etc using --filename-convention

Features

  • feat: unique client export names by @mnahkies in #263
  • feat!: dynamic filename conventions / no spaces in filenames by @mnahkies in #259
  • feat: safer identifier transformation by @mnahkies in #260

Misc

Full Changelog: v0.15.0...v0.16.0

v0.15.0

27 Oct 17:14
Compare
Choose a tag to compare

What's Changed

It's now possible to change the construct used for the "implementation" symbol between being a type, interface or abstract class using the new option --ts-server-implementation-method. This is particularly useful if using a dependency injection library that requires abstract class as part of its wiring approach.

Additionally, when splitting the generated files by first-tag / first-slug (using --grouping-strategy), the tag/slug will now be added to the exported symbol names, eg: createRouter -> createMyTagRouter and Implementation -> MyTagImplementation. This can reduce the need to alias imports manually.

The generic Implementation / createRouter exports have be retained to keep this backwards compatible.

Features

  • feat: support emitting abstract classes for implementation types by @mnahkies in #256
  • feat: emit unique symbol names for Implementation / createRouter functions by @mnahkies in #258

Misc

Full Changelog: v0.14.0...v0.15.0

v0.14.0

12 Oct 12:13
Compare
Choose a tag to compare

What's Changed

Fixes a few small bugs, and adds support for relative $refs when using a URI as the input.

Features

  • feat: support loading relative remote uris by @mnahkies in #254

Bug fixes

  • fix: allow $ref to be used as a schema property by @mnahkies in #250
  • fix: handle type: "null" in anyOf / oneOf / allOf by @mnahkies in #252

Misc

Full Changelog: v0.13.0...v0.14.0