openapi-code-generator

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

Downloads
2.7K
Stars
13

Bot releases are hidden (Show)

openapi-code-generator - v0.10.0 Latest Release

Published by mnahkies 5 months ago

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

Internal refactoring

Docs

Misc

New Contributors

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

openapi-code-generator - v0.9.0

Published by mnahkies 6 months ago

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

Bug fixes

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

openapi-code-generator - v0.8.0

Published by mnahkies 7 months ago

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

Misc

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

openapi-code-generator - v0.7.0

Published by mnahkies 8 months ago

What's Changed

Features

Misc

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

openapi-code-generator - v0.6.0

Published by mnahkies 8 months ago

What's Changed

Features

Misc

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

openapi-code-generator - v0.5.0

Published by mnahkies 8 months ago

What's Changed

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.

New Contributors

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

openapi-code-generator - v0.4.0

Published by mnahkies 10 months ago

What's Changed

Bugs

Misc

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

openapi-code-generator - v0.3.0

Published by mnahkies 11 months ago

What's Changed

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

openapi-code-generator - v0.2.0

Published by mnahkies 11 months ago

What's Changed

Features

Bug Fixes

Misc

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

openapi-code-generator - v0.1.1

Published by mnahkies 11 months ago

What's Changed

Breaking changes

Fixes

Misc

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

openapi-code-generator - v0.1.0

Published by mnahkies about 1 year ago

Initial Release.

What's Changed

New Contributors

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

Package Rankings
Top 29.84% on Npmjs.org
Badges
Extracted from project README
npm
Related Projects