Skip to content

v9.0.0

Choose a tag to compare

@AGalabov AGalabov released this 14 Jul 13:52
· 9 commits to master since this release

What's Changed - Added support for OpenAPI 3.2 (#385)

  • feat: add OpenApiGeneratorV32 for OpenAPI 3.2.0 documents
  • feat: support 3.2 media-type fields — itemSchema, itemEncoding, and prefixEncoding (for streams like text/event-stream, application/jsonl, application/json-seq)
  • feat: support the query HTTP method on routes
  • feat: support optional summary on responses
  • feat: support mediaTypes as a reusable component type via registerComponent
  • feat: allow $ref entries directly in ZodContentObject
  • chore: bump openapi3-ts to ^4.6.0

OpenApiGeneratorV32 reuses the same JSON Schema dialect as 3.1 (2020-12), so schema output is unchanged from OpenApiGeneratorV31. Use it when you need 3.2 document-structure fields.

Breaking changes (TypeScript only)

These are interface-only changes; runtime behavior for existing OpenApiGeneratorV3 / OpenApiGeneratorV31 usage is unchanged.

  • ResponseConfig.description is now optional (required by OpenAPI 3.0/3.1, optional in 3.2). Code that assumes description is always present may need a guard or non-null assertion.
  • ZodMediaTypeObject.schema is now optional, to support itemSchema-only media types.

No other exported API removals or signature changes.

New Contributors

Full Changelog: v8.5.0...v9.0.0