Overview
Express Zod API uses branded types to distinguish its proprietary schemas from regular Zod schemas. These brands enable special handling for dates, files, forms, and raw data.The ez Object
All proprietary schemas are accessed through theez object:
Schema Brands
Each proprietary schema has a unique brand for type identification:Date Schemas
ezDateInBrand
Identifies schemas created withez.dateIn().
ezDateOutBrand
Identifies schemas created withez.dateOut().
File Schemas
ezUploadBrand
Identifies file upload schemas created withez.upload().
ezBufferBrand
Identifies buffer schemas for binary responses.Form Schema
ezFormBrand
Identifies form data schemas created withez.form().
Raw Data Schema
ezRawBrand
Identifies raw buffer schemas created withez.raw().
Brand Usage
The framework uses these brands internally to:- Select correct parsers - Form data, JSON, multipart, or raw
- Generate accurate OpenAPI specs - Correct content types and schemas
- Transform data - Convert between Date objects and ISO strings
- Validate input - Apply appropriate validation logic
Type Safety
Brands ensure type safety throughout the request/response cycle:Combining Schemas
Proprietary schemas work seamlessly with regular Zod schemas:See Also
ez Schemas
Complete ez schema reference
Zod Plugin
Zod extensions and helpers
Schema Validation
Input/output validation
OpenAPI
OpenAPI schema generation