function Public
Since 0.1.0
Public(): SetuMethodDecorator

Marks an unrestricted route as public in the OpenAPI document: its schema carries security: [], so a document-level security requirement does not apply to it.

It does NOT exempt a route from a guard or from @Roles/@Permissions enforcement — those still run and still refuse. When enforcement is enabled, a route carrying a restriction omits the public marker so derived OpenAPI security remains truthful. A route that must be reachable unauthenticated should carry no restriction in the first place.

Return Type

A method decorator

Usage

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