Skip to content

ShokupanRoute

ShokupanRoute = object

Defined in: src/util/types.ts:402

optional bakedHandler: ShokupanHandler

Defined in: src/util/types.ts:427

Optimization: Handler with hooks baked in. Used by runtime router, while handler is used by OpenAPI generator.


optional controller: any

Defined in: src/util/types.ts:472

Controller instance this route belongs to


optional group: string

Defined in: src/util/types.ts:435

Group for the route


optional guards: object[]

Defined in: src/util/types.ts:439

Guards for the route

handler: ShokupanHandler

Guard handler

optional spec: GuardAPISpec

Guard OpenAPI spec


handler: ShokupanHandler

Defined in: src/util/types.ts:422

Route handler


optional handlerSpec: MethodAPISpec | AsyncAPISpec

Defined in: src/util/types.ts:431

OpenAPI spec for the route


optional hooks: ShokupanHooks

Defined in: src/util/types.ts:460

Hooks from the router/route definition


optional isSocket: boolean

Defined in: src/util/types.ts:480

Whether this route is a WebSocket route


keys: string[]

Defined in: src/util/types.ts:418

Route parameters


optional metadata: RouteMetadata

Defined in: src/util/types.ts:464

Source metadata


method: Method

Defined in: src/util/types.ts:406

HTTP method


optional middleware: Middleware[]

Defined in: src/util/types.ts:476

Middleware stack metadata for this route (Controller/Method level)


optional order: number

Defined in: src/util/types.ts:468

Order of the middleware


path: string

Defined in: src/util/types.ts:410

Route path


regex: RegExp

Defined in: src/util/types.ts:414

Compiled regex for the route


optional renderer: JSXRenderer

Defined in: src/util/types.ts:456

Custom JSX renderer for this route.


optional requestTimeout: number

Defined in: src/util/types.ts:452

Timeout for this specific route (milliseconds).