property DecoratorPluginOptions.enforceSchemas

When true (the default), a route decorated with @ValidateBody / @ValidateQuery / @ValidateParams gets the registered validation capability's enforcing middleware appended LAST in its chain (innermost, after guards and filters), so an invalid request is rejected with 400 before the handler runs — while guard 401/403 precedence is preserved.

When false, schemas stay description-only (surfaced via RouteDefinition.schema for OpenAPI) and no enforcement middleware is appended; the absent-capability warning is also silenced.

Type

boolean

Usage

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