ReferenceRelease Notes

Release notes

💡

This page is statically generated from the Github releases, and may sometimes be slightly out of date.

22 Dec 2024 (v0.18.0)

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

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.17.0…v0.18.0

11 Dec 2024 (v0.17.0)

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

Docs

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.16.0…v0.17.0

2 Nov 2024 (v0.16.0)

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

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.15.0…v0.16.0

27 Oct 2024 (v0.15.0)

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

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.14.0…v0.15.0

12 Oct 2024 (v0.14.0)

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

Features

Bug fixes

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.13.0…v0.14.0

20 Sept 2024 (v0.13.0)

This release adds support for schemas specifying default values, and begins validating / parsing incoming request headers. Note: this may be a breaking change if your server currently accepts requests with invalid request headers.

Features

Docs

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.12.1…v0.13.0

17 Aug 2024 (v0.12.1)

This release fixes a small typing mistake preventing queries parameters of type number[] from building properly, and fixes bugs in the handling of header parameters / defaults and the “escape hatch” parameters allowing arbitrary fetch / axios request options to be passed.

It’s also the first release with automated end-to-end tests in place, though the coverage is still low - this will be improved during the course of development going forward.

Bug fixes

Testing

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.12.0…v0.12.1

5 Aug 2024 (v0.12.0)

Another small release, adding a new CLI parameter OPENAPI_REMOTE_SPEC_REQUEST_HEADERS / --remote-spec-request-headers that allows request headers to be sent when fetching specifications from remote URI’s.

This makes it possible to generate from a remote URI that is behind some form of header based authentication, eg: Authorization: Bearer <bla> (which includes cookie based authentication since cookies are just a Cookie header, and basic auth as this is just Authorization: Basic <credentials>).

The headers are scoped to specific domains/urls such that you can mix and match sources without leaking tokens to the wrong servers.

Features

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.11.2…v0.12.0

29 Jul 2024 (v0.11.2)

This is a bug fix release, solving an issue with the order schemas were output when generating from specifications that are split over multiple files, causing variable used before declaration issues.

Bug fixes

Documentation

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.11.1…v0.11.2

27 Jul 2024 (v0.11.1)

This is a bug fix release, containing a solution for https://github.com/mnahkies/openapi-code-generator/issues/217.

Previously query parameters of an array type did not work when a single element was provided, now this will be parsed and handed to the route handler as an array of one element.

Bug fixes

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.11.0…v0.11.1

8 Jun 2024 (v0.11.0)

This release contains 1 bug fix for default header handling in typescript-axios and several internal refactoring changes required to facilitate the work-in-progress documentation playground

Also dropped eslint for biome because I can’t be bothered figuring out the eslint@^9 upgrade / configuration migration.

Bug fixes

Internal refactoring

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.10.0…v0.11.0

25 May 2024 (v0.10.0)

This release is primarily bug fixes, and internal refactoring to facilitate improvements to documentation. Most effort has gone into the new documentation site live at https://openapi-code-generator.nahkies.co.nz/

It also splits the cli from the library entrypoint such that you can now import {generate} from '@nahkies/openapi-code-generator' for programmatic usage if you wish, and improves handling of boolean cli flags.

BREAKING CHANGES There are several potentially breaking changes here:

  • Dropped the “safe edit region” functionality, I doubt anyone was using this and it wasn’t particularly robust
  • Improved handling of additionalProperties / {} schemas to better align with the specification
  • Joi validation became stricter for strings with format email / date-time

This may make some schemas / types change type to unknown, and start serializing/deserializing values that were previously stripped (see #200). If you want more permissive types (any) in these situations rather than unknown you can use the --ts-allow-any cli flag.

Bug fixes

Internal refactoring

Docs

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.9.0…v0.10.0

27 Apr 2024 (v0.9.0)

There are two new features in this release:

  • Typespec can now be used as an input file by passing --input-type=typespec as an additional arg
  • You can now use a url for your input file (openapi specs only, typespec must be local files)

Features

Bug fixes

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.8.0…v0.9.0

7 Apr 2024 (v0.8.0)

There are three main features in this release:

  • Improve json schema validation support for string, number, array (min / max / etc)
  • Make boolean schema validation stricter
  • Start using a pre-compiled ajv validator for better performance

BREAKING CHANGES Previously any truthy value would be accepted for a boolean, eg: any-string would parse to true. Now its parsed like:

  • true | "true" | 1 -> true
  • false | "false" | 0 -> false
  • anything else -> error

Features

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.7.0…v0.8.0

3 Mar 2024 (v0.7.0)

Features

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.6.0…v0.7.0

19 Feb 2024 (v0.6.0)

Features

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.5.0…v0.6.0

10 Feb 2024 (v0.5.0)

Features

Misc

Upgrading notes You may need to replace the Context type from koa with RouterContext from @koa/router in some cases due to changes in the upstream type definitions.

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.4.0…v0.5.0

5 Jan 2024 (v0.4.0)

Bugs

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.3.0…v0.4.0

2 Dec 2023 (v0.3.0)

Breaking Changes Errors thrown during request handling in typescript-koa will now be wrapped in KoaRuntimeError objects with the original exception included as the cause, in order to provide additional context about where the error was thrown.

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.2.0…v0.3.0

12 Nov 2023 (v0.2.0)

Features

Bug Fixes

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.1.1…v0.2.0

11 Nov 2023 (v0.1.1)

Breaking changes

Fixes

Misc

Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.1.0…v0.1.1

1 Oct 2023 (v0.1.0)

Initial Release.

Full Changelog: https://github.com/mnahkies/openapi-code-generator/commits/v0.1.0