Skip to content

tsoa-next / tsoa-next / SpecPath

Function: SpecPath() ​

ts
function SpecPath(
   path?, 
   optionsOrTarget?, 
   cache?): ClassDecorator;

Defined in: packages/runtime/src/decorators/specPath.ts:157

Registers a controller-local route that serves the generated OpenAPI document or a custom derived response.

Parameters ​

path? ​

string

The relative route path. Defaults to spec.

optionsOrTarget? ​

| SpecPathTarget | SpecPathOptions

Either a SpecPathOptions object or the legacy target argument.

cache? ​

SpecPathCache

Legacy cache strategy argument. Defaults to in-memory caching.

Returns ​

ClassDecorator

TypeScript-first OpenAPI generation, route generation, and runtime validation.