What's Changed
This is an unusually large release, containing major architectural improvements, enhanced query parameter handling, and support for binary data.
It also contains several breaking changes to improve the internal domain model and consistency of the generated code, that will unblock further enhancements.
🚨 Breaking Changes
- Migrated to tsdown for bundling, providing both ESM and CJS variants of runtime packages #452, #456
- This shouldn't be a breaking change, but its significant enough to be aware of it
- Runtime & Response Processing
- Renamed Response to Res in runtime packages to avoid conflicts with the global DOM Response object #405
- Removed deprecated exports that are no longer used in regenerated code #406
- Migration: Regenerate your code using the latest CLI and update any manual imports from runtime packages referencing Response
- Schema & Type Naming
- Refactored "virtual schema" generation. This improves support for OAS 3.1+ but results in changed names for some anonymous types #398
- Some indirection has been removed e.g., types that just pointed to other types are now unwrapped
- Migration: You may need to update manual type references in your project if they were using generated anonymous names
- Query Parameter Serialization
- Dropped qs dependency in favor of internal logic that strictly respects OpenAPI style and explode modifiers #381
koav3 and@koa/router@v15now the minimum requirement #442- Dropped broken
readOnlymodifier support #409
✨ Features
- Binary Data Support: Added support for
application/octet-streamin both request and response bodies #359 - Improved Records: Better handling of
additionalProperties, emittingRecord<string, T>oranyas appropriate #408, #402 - Middleware: Added support for mounting middleware on individual routers via an optional parameter to
createRouter#442 - Improved handling of
allOf,anyOf, andoneOf#410
🐛 Bug Fixes
- Fixed missing types when enum is defined without an explicit type #407
- Fixed handling of boolean values for exclusiveMaximum and exclusiveMinimum #386
- Fixed tsconfig loading when compilerOptions is missing #382
- The logger now correctly respects NO_COLOR and similar environment variables #414
- Client Fetch: Fixed type narrowing issues with default response types in the fetch runtime #443
- Koa Server: Fixed overlapping route matching by no longer calling next() after a route handler is executed #442
🧹 Chore & Internal Improvements
- Dependencies: Extensive dependency refreshes, including migrations to Angular v21, Next.js v16.1, and TypeScript v6
- Testing: Significant expansion of the test suite, including new unit tests for schema normalization and type building #387, #389, #412
- CI/CD: Dropped Node v20 from CI, improved integration test performance using tsgo #451, and enabled publint and attw for better package compatibility #454
- Refactors: Major internal reorganization of the Input class and schema providers to simplify the dependency graph and improve testability #388, #416, #420
- Introduced code sharing between the runtime packages #401
Full Changes
- fix: tsconfig loading when no compilerOptions by @mnahkies in #382
- chore(deps): update all dependencies by @renovate[bot] in #380
- chore(deps): update dependency js-yaml to v4.1.1 [security] by @renovate[bot] in #383
- chore: upgrade dependencies, integration tests use angular v21 by @mnahkies in #384
- refactor: allow narrowing IRParameter into more specific types by @mnahkies in #385
- test: add some missing unit tests by @mnahkies in #387
- refactor: split input into more testable classes by @mnahkies in #388
- test: backfill tests for schema normalization by @mnahkies in #389
- fix: use schema types rather than ir by @mnahkies in #390
- fix: remove an instance of double normalization by @mnahkies in #391
- chore(deps): update dependency @angular/common to v21.0.1 [security] by @renovate[bot] in #393
- chore(deps): update dependency body-parser to v2.2.1 [security] by @renovate[bot] in #392
- chore(deps): update dependency next to v15.5.7 [security] by @renovate[bot] in #394
- chore(deps): update dependency @angular/compiler to v21.0.2 [security] by @renovate[bot] in #395
- chore: bump deps, separate build:docs by @mnahkies in #397
- feat!: move virtual schemas by @mnahkies in #398
- fix: remove request body indirection by @mnahkies in #399
- fix: handle boolean exclusiveMaximum / exclusiveMinimum by @mnahkies in #386
- feat!: introduce a new common runtime by @mnahkies in #401
- fix: correctly output Record<string, unknown> when irrelevant properties present by @mnahkies in #402
- fix!: query param serialization/parsing by @mnahkies in #381
- chore: update biome by @mnahkies in #403
- chore: upgrade nextjs to 16.1.0 by @mnahkies in #404
- refactor!: move more response processing into runtime package by @mnahkies in #405
- chore!: drop deprecated export by @mnahkies in #406
- feat: support application/octet-stream (Blob) req/res bodies by @mnahkies in #359
- fix: handle missing type when enum is defined by @mnahkies in #407
- feat: improve Record / additionalProperties handling by @mnahkies in #408
- fix: drop broken readOnly modifier support by @mnahkies in #409
- fix: make custom jest reporter more agent friendly by @mnahkies in #411
- fix: improve handling of allOf / anyOf / oneOf by @mnahkies in #410
- test: improve type builder unit tests by @mnahkies in #412
- test: expand extractPlaceholders tests by @mnahkies in #413
- fix: logger disables color based on NO_COLOR / etc by @mnahkies in #414
- refactor: split input.ts into several files by @mnahkies in #416
- refactor: simplify dependency graph by @mnahkies in #417
- refactor: copy schema builder test suites into unit / integration files by @mnahkies in #418
- refactor: de-duplicate the split tests by @mnahkies in #419
- refactor: schema-builders use ISchemaProvider instead of Input by @mnahkies in #420
- chore(deps): update dependency @angular/compiler to v21.0.7 [security] by @renovate[bot] in #421
- chore(deps): update dependency @angular/core to v21.0.7 [security] by @renovate[bot] in #422
- chore(deps): update dependency next to v16.1.5 [security] by @renovate[bot] in #424
- chore(deps): update dependency lodash to v4.17.23 [security] by @renovate[bot] in #423
- chore: refresh dependencies by @mnahkies in #425
- fix: patch axios temporarily / bump version by @mnahkies in #427
- chore: refresh dependencies by @mnahkies in #429
- chore(deps): update dependency ajv to v8.18.0 [security] by @renovate[bot] in #428
- chore(deps): update dependency koa to v3.1.2 [security] by @renovate[bot] in #430
- chore(deps): update dependency @angular/core to v21.1.6 [security] by @renovate[bot] in #431
- chore: refresh deps by @mnahkies in #434
- chore: add pnpm run ci-pipeline:fast by @mnahkies in #441
- chore: refresh dependencies / typescript v6 by @mnahkies in #449
- fix(fetch): type narrowing with default response types by @mnahkies in #443
- chore: bump gh action deps, drop node v20 from ci by @mnahkies in #450
- feat: use tsgo for most integration test builds by @mnahkies in #451
- feat: bundle esm + cjs variants of runtime packages using tsdown by @mnahkies in #452
- fix: only package dist/esm, dist/cjs by @mnahkies in #453
- feat: enable publint and attw by @mnahkies in #454
- feat!(koa): router v15, improve middleware support, fix overlapping route matching by @mnahkies in #442
- fix: use global symbol for SkipResponse by @mnahkies in #455
- feat: adopt tsdown for cli package, inline the typescript-common-runtime by @mnahkies in #456
- fix: devDependency not dependency by @mnahkies in #457
- fix: remove import 'joi' from bundle by @mnahkies in #458
- fix: required peer dependencies by @mnahkies in #459
- fix: clean works when already clean by @mnahkies in #460
New Contributors
Full Changelog: v0.22.0...v0.23.0