A code generation tool for openapi 3 / 3.1 specifications written in typescript, primarily aimed at generating typescript clients and server stubs. Other target languages may be added in future.
MIT License
Bot releases are visible (Hide)
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:
additionalProperties
/ {}
schemas to better align with the specificationemail
/ 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
Published by mnahkies 6 months ago
There are two new features in this release:
--input-type=typespec
as an additional argFeatures
Bug fixes
Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.8.0...v0.9.0
Published by mnahkies 7 months ago
There are three main features in this release:
string
, number
, array
(min / max / etc)boolean
schema validation stricterBREAKING 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
Features
Misc
Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.7.0...v0.8.0
Published by mnahkies 8 months ago
Features
Misc
Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.6.0...v0.7.0
Published by mnahkies 8 months ago
Features
Misc
Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.5.0...v0.6.0
Published by mnahkies 8 months ago
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
Published by mnahkies 10 months ago
Bugs
Misc
Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.3.0...v0.4.0
Published by mnahkies 11 months ago
typescript-axios
template by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/83
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
typescript-koa
by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/113
Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.2.0...v0.3.0
Published by mnahkies 11 months ago
Features
Bug Fixes
"
in string enum values by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/107
Misc
Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.1.1...v0.2.0
Published by mnahkies 11 months ago
Breaking changes
Fixes
Misc
Full Changelog: https://github.com/mnahkies/openapi-code-generator/compare/v0.1.0...v0.1.1
Published by mnahkies about 1 year ago
Initial Release.
Full Changelog: https://github.com/mnahkies/openapi-code-generator/commits/v0.1.0