Skip to content

ShokupanRoute

ShokupanRoute = object

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

optional bakedHandler: ShokupanHandler

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

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:489

Controller instance this route belongs to


optional fileAccessCheck: (ctx, path) => boolean

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

Custom file access check for routes that use ctx.file(). Return true to allow access to the file, false to deny.

ShokupanContext

string

boolean


optional group: string

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

Group for the route


optional guards: object[]

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

Guards for the route

handler: ShokupanHandler

Guard handler

optional spec: GuardAPISpec

Guard OpenAPI spec


handler: ShokupanHandler

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

Route handler


optional handlerSpec: MethodAPISpec | AsyncAPISpec

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

OpenAPI spec for the route


optional hooks: ShokupanHooks

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

Hooks from the router/route definition


optional isSocket: boolean

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

Whether this route is a WebSocket route


keys: string[]

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

Route parameters


optional metadata: RouteMetadata

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

Source metadata


method: Method

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

HTTP method


optional middleware: Middleware[]

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

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


optional order: number

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

Order of the middleware


path: string

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

Route path


regex: RegExp

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

Compiled regex for the route


optional renderer: JSXRenderer

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

Custom JSX renderer for this route.


optional requestTimeout: number

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

Timeout for this specific route (milliseconds).