Releases: mnahkies/openapi-code-generator
v0.11.0
What's Changed
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
- fix: make logger compatible with web by @mnahkies in #211
- fix: decouple validator from readline by @mnahkies in #212
- feat: add a prettier based formatter by @mnahkies in #213
- fix: move tsconfig loading by @mnahkies in #214
- fix: decouple typespec loader from readline by @mnahkies in #215
Misc
Full Changelog: v0.10.0...v0.11.0
v0.10.0
What's Changed
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
- fix!: an {} schema should be an unknown/any type by @mnahkies in #204
- fix!: drop safe edit regions by @mnahkies in #198
- fix!: joi supports email / date-time string formats by @mnahkies in #206
- fix: improve handling of cli boolean params by @mnahkies in #205
- fix: only allow publish of releases from latest main by @mnahkies in #161
Internal refactoring
- refactor: create TypescriptFormatter class by @mnahkies in #199
- refactor: isolate filesystem interaction by @mnahkies in #201
- refactor: split cli to allow programmatic use by @mnahkies in #202
Docs
- feat: new documentation website by @mnahkies in #162
- feat: publish docs from ci, add ga to docs by @mnahkies in #163
- fix: provide a user by @mnahkies in #164
- fix: try git config by @mnahkies in #165
- fix: set url by @mnahkies in #166
- fix: move script to _app by @mnahkies in #167
- fix: replace default nextra meta descriptions by @mnahkies in #168
- docs: show typespec shell snippets, mention runtime response validation by @mnahkies in #169
- docs: move architecture into nextra site by @mnahkies in #186
- docs: update readme by @mnahkies in #187
- fix(docs): correct header level by @mnahkies in #209
Misc
- chore: upgrade dependencies / angular v18 by @mnahkies in #207
- chore: refresh data and regenerate by @mnahkies in #208
- chore: bump lerna by @mnahkies in #203
- fix: make renovate less noisy by @mnahkies in #197
- chore: Configure Renovate by @renovate in #170
- chore(deps): update dependency @azure-tools/typespec-client-generator-core to v0.41.8 by @renovate in #171
- chore(deps): update dependency @types/node to v20.12.8 by @renovate in #172
- fix(deps): update angular monorepo by @renovate in #175
- chore(deps): update dependency typescript to ~5.4.0 by @renovate in #180
- chore(deps): update dependency node to v20.12.2 by @renovate in #179
- chore(deps): update yarn to v4.2.1 by @renovate in #182
- chore(deps): update dependency zod to v3.23.6 by @renovate in #174
- chore(deps): update typescript-eslint monorepo to v7.8.0 by @renovate in #181
- fix(deps): update dependency ajv to v8.13.0 by @renovate in #183
- chore(deps): update dependency eslint-plugin-jest to v28.5.0 by @renovate in #178
- fix(deps): update dependency @biomejs/biome to v1.7.2 by @renovate in #176
New Contributors
Full Changelog: v0.9.0...v0.10.0
v0.9.0
What's Changed
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
- feat: support typespec as an input format by @mnahkies in #158
- feat: support loading input from uri by @mnahkies in #150
Bug fixes
Full Changelog: v0.8.0...v0.9.0
v0.8.0
What's Changed
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
- feat: support minimum / maximum for numbers by @mnahkies in #140
- feat: use pre-compiled ajv validators at runtime by @mnahkies in #141
- feat: joi number min/max validation by @mnahkies in #143
- feat: support exclusive min/max and multipleOf by @mnahkies in #144
- feat: support string validation by @mnahkies in #145
- fix!: stricter booleans by @mnahkies in #146
- feat: support basic array validation by @mnahkies in #147
Misc
- chore(deps): Bump follow-redirects from 1.15.5 to 1.15.6 by @dependabot in #136
- chore(deps): Bump webpack-dev-middleware from 5.3.3 to 5.3.4 by @dependabot in #137
- chore(deps): Bump express from 4.18.3 to 4.19.2 by @dependabot in #138
- chore: deps by @mnahkies in #139
- chore: refresh data by @mnahkies in #142
- chore: bump deps by @mnahkies in #149
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
Features
- feat: experimental support for splitting code by tags / route segments by @mnahkies in #134
- feat: eliminate unused imports by @mnahkies in #132
- feat: use strict typescript settings by @mnahkies in #131
- feat: adopt biome for code formatting by @mnahkies in #129
Misc
- chore: update dependencies by @mnahkies in #133
- chore(deps): Bump ip from 2.0.0 to 2.0.1 by @dependabot in #130
Full Changelog: v0.6.0...v0.7.0
v0.6.0
v0.5.0
What's Changed
Features
- feat: experimental support for extracting inline schemas by @mnahkies in #123
- feat: client generators support experimental runtime response validation by @mnahkies in #112
Misc
- docs: tiny improvement by @asfaltboy in #122
- chore: update deps / use RouterContext by @mnahkies in #124
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.
New Contributors
- @asfaltboy made their first contribution in #122
Full Changelog: v0.4.0...v0.5.0
v0.4.0
What's Changed
Bugs
- fix: incorrect .d.ts path for zod by @mnahkies in #119
- fix(koa): don't camel-case route placeholders by @mnahkies in #120
Misc
- chore(deps-dev): Bump @koa/cors from 4.0.0 to 5.0.0 by @dependabot in #116
- chore: bump deps by @mnahkies in #121
Full Changelog: v0.3.0...v0.4.0
v0.3.0
What's Changed
- feat: add
typescript-axios
template by @mnahkies in #83 - feat!: throw discriminable errors indicating point of failure by @mnahkies in #95
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
- fix: decouple schema builders from
typescript-koa
by @mnahkies in #113 - feat: include schema builder in client generators by @mnahkies in #114
- chore: upgrade angular / dependencies by @mnahkies in #115
Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's Changed
Features
Bug Fixes
- fix: skip broken openapi 3.1 validation for now by @mnahkies in #104
- fix: allow numeric header values by @mnahkies in #105
- fix: handle null in enums by @mnahkies in #106
- fix: handle
"
in string enum values by @mnahkies in #107 - fix: use numerical enums when creating zod schema by @mnahkies in #108
- fix: optional oneOf / allOf / anyOf / $ref's by @mnahkies in #110
Misc
- chore: refresh lockfile by @mnahkies in #100
- chore: use branch as preid / dist-tag on alpha versions by @mnahkies in #101
Full Changelog: v0.1.1...v0.2.0