function ValidateParams
Since 0.1.0
ValidateParams(schema: unknown): SetuMethodDecorator

Attaches a path parameter schema to the decorated route handler.

The schema is enforced (invalid path parameters answered with 400) when a CAPABILITIES.VALIDATION provider is registered and enforceSchemas is not false; otherwise it remains description-only. See the module documentation.

Parameters

schema: unknown

Validation schema (Zod schema by convention)

Return Type

A method decorator

Usage

import { ValidateParams } from "decorator-plugin/src/index.ts";