✨ New Features
- OpenAPI 3.1 support for
discriminatorand polymorphic types - New
transform()andpostTransform()hooks give you more control in overriding/extending generated types - Deep-linked remote schemas now work
--immutable-typeshas a new-talias- Addition of
path.defaulttypes
🚀 Improvements
- Sped up type generation by ~3× by dropping Prettier & optimizing deep-object crawl speed
- More accurate types for
oneOf/anyOf/allOf(#894) - Now ships modern
ESNextcode rather thanES2018 - Codebase cleanup; improved internal types & documentation
- Test cleanup, now powered by Vitest
🐛 Bugfixes
🔨 Breaking Changes
- Dropped Prettier formatting and all formatting options. Now, simply format at your discretion (or not at all!)
- Dropped support for Swagger 2.0
- Dropped Node 14 support (it still works for now, but Node 14 bugs won’t be fixed if any arise)
--versionwas changed to return the version of this library (also by dropping Swagger 2.0 support the old usage was no longer needed)- Dropped
--raw-schema. Your entry schema MUST be valid and complete (however, your$refsto subschemas may be partials). - Dropped
--make-paths-enumbecause it was incompatible with--path-params-as-types - Dropped the CLI aliases
-itand-ap(specify the full--immutable-typesor--additional-propertiesflag) - Empty content:
{}now returnsnever. Dropped the--content-neverflag as this is now the default behavior. - Renamed and upgraded the Node API’s
formatter()function totransform()andpostTransform(). It’s an overall improvement on the original concept with even more power than before.