Skip to content

covenix / Params

Function: Params()

Params(schema): MethodDecorator

Defined in: src/decorators.ts:108

Validates req.params against the given Zod object before the handler runs. Parsed (coerced) values are what @Param injects. A failure responds 400.

Parameters

schema

ZodObject

Zod object schema describing the path parameters.

Returns

MethodDecorator