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

Attaches a query parameter schema to the decorated route handler.

The schema is enforced (invalid queries 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 { ValidateQuery } from "decorator-plugin/src/index.ts";