Skip to content

covenix / Body

Function: Body() ​

Body(schema): MethodDecorator

Defined in: src/decorators.ts:167

Validates req.body against the given Zod schema before the handler runs. The parsed value is what @BodyParam injects. A failure responds 422.

Parameters ​

schema ​

ZodType

Zod schema describing the request body.

Returns ​

MethodDecorator