Releases: mnahkies/openapi-code-generator
v0.18.0
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
tojoi
- Unused
Res
andStatusCode
types removed fromtypescript-axios-runtime
package TypedFetchResponse
removed fromtypescript-fetch-runtime
package, use exported typeRes
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
- chore: refresh / update deps by @mnahkies in #289
- test: add missing unit tests to utils by @mnahkies in #292
- docs: regenerate release-notes by @mnahkies in #279
Full Changelog: v0.17.0...v0.18.0
v0.17.0
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
- feat: support servers at path / operation level + variables by @mnahkies in #272
- feat: defaultHeaders is optional by @mnahkies in #274
- feat: support http verb 'head' by @mnahkies in #271
Bug Fixes
- fix: support exactOptionalPropertyTypes on client SDKs by @mnahkies in #278
- fix!: angular modules have unique export names by @mnahkies in #270
Docs
- docs: add tips page by @mnahkies in #275
- docs: use with react-query by @mnahkies in #276
- docs: add roadmap / release notes by @mnahkies in #277
- docs: iterate on the documentation by @mnahkies in #268
Misc
- chore: dependencies by @mnahkies in #273
- chore(deps): update all dependencies by @renovate in #269
- chore: dependencies / refresh data by @mnahkies in #267
Full Changelog: v0.16.0...v0.17.0
v0.16.0
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
- fix: format/emit in parallel by @mnahkies in #265
- chore: upgrade to next@15 by @mnahkies in #261
- chore(deps): update all dependencies by @renovate in #262
- chore: refresh data + regenerate by @mnahkies in #264
Full Changelog: v0.15.0...v0.16.0
v0.15.0
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
- fix(docs): improve meta tags by @mnahkies in #255
- chore: dependencies / refresh data by @mnahkies in #257
Full Changelog: v0.14.0...v0.15.0
v0.14.0
What's Changed
Fixes a few small bugs, and adds support for relative $ref
s when using a URI as the input.
Features
Bug fixes
- fix: allow
$ref
to be used as a schema property by @mnahkies in #250 - fix: handle
type: "null"
inanyOf
/oneOf
/allOf
by @mnahkies in #252
Misc
- chore(deps): update all dependencies by @renovate in #251
- fix(docs): use absolute url for og:image by @mnahkies in #253
- chore(docs): switch to self-hosted plausible ce by @mnahkies in #249
Full Changelog: v0.13.0...v0.14.0
v0.13.0
What's Changed
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
- feat: support default values by @mnahkies in #241
- feat!: parse/validate request headers by @mnahkies in #247
- feat: include urls from servers array in basePath type by @mnahkies in #246
Docs
Misc
- chore(deps): update all dependencies by @renovate in #239
- chore(deps): Bump micromatch from 4.0.7 to 4.0.8 by @dependabot in #240
- chore: update dependencies and refresh data files by @mnahkies in #244
- chore: upgrade typescript by @mnahkies in #245
Full Changelog: v0.12.1...v0.13.0
v0.12.1
What's Changed
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
- fix: allow number array query param by @mnahkies in #236
- fix(fetch/axios): correctly merge headers from opts by @mnahkies in #231
Testing
Misc
- chore(deps): update dependency axios to v1.7.4 [security] by @renovate in #232
- chore: dependencies / refresh data by @mnahkies in #233
- chore: tweak npm metadata by @mnahkies in #234
- chore: use node 22 by default by @mnahkies in #237
Full Changelog: v0.12.0...v0.12.1
v0.12.0
What's Changed
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: v0.11.2...v0.12.0
v0.11.2
What's Changed
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: v0.11.1...v0.11.2
v0.11.1
What's Changed
This is a bug fix release, containing a solution for #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
- chore(deps): update all dependencies by @renovate in #210
- chore(deps): update all dependencies by @renovate in #221
- chore: refresh data / use new okta specs by @mnahkies in #222
- chore: update dependencies by @mnahkies in #223
- fix: peer dependency by @mnahkies in #224
Full Changelog: v0.11.0...v0.11.1