1.5.0
Features
- Replaced
nestjs-zod
with zod-openapi. The main benefit is output schemas will now emit OpenApi schemas and consequently TypeScript definitions for endpoint payloads that considerZodEffects
.
Example:
const schema = z.object({
age: z.number().default(30),
});
The above schema when used in input
will still mark age
as optional, but when used in output
it will not.
type ExampleInput = {
age?: number;
};
type ExampleOutput = {
age: number;
};