Skip to content

Workery / routing / Route

Class: Route<R, Ps, E>

routing.Route

Type parameters

NameType
RR
Psextends RouteParameters
Eunknown

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Route<R, Ps, E>(init): Route<R, Ps, E>

Type parameters

NameType
RR
Psextends RouteParameters
Eunknown

Parameters

NameType
initObject
init.methodHTTPMethod
init.pathstring
init.name?string
init.tags?string[]
init.summary?string
init.description?string
init.deprecated?boolean
init.responses?Record<number, ResponseConfig>
init.includeInSchema?boolean
init.statusCode?number
init.responseClass?ResponseClass
init.parametersPs
init.handleRouteHandler<R, Ps, E>

Returns

Route<R, Ps, E>

Defined in

src/routing.ts:58

Properties

method

method: HTTPMethod

Defined in

src/routing.ts:44


path

path: string

Defined in

src/routing.ts:45


name

Optional name: string

Defined in

src/routing.ts:46


tags

tags: string[]

Defined in

src/routing.ts:47


summary

summary: string

Defined in

src/routing.ts:48


description

description: string

Defined in

src/routing.ts:49


deprecated

deprecated: boolean

Defined in

src/routing.ts:50


responses

responses: Record<number, ResponseConfig>

Defined in

src/routing.ts:51


statusCode

statusCode: number

Defined in

src/routing.ts:52


includeInSchema

includeInSchema: boolean

Defined in

src/routing.ts:53


responseClass

responseClass: ResponseClass

Defined in

src/routing.ts:54


parameters

parameters: Ps

Defined in

src/routing.ts:55


handle

handle: RouteHandler<R, Ps, E>

Defined in

src/routing.ts:56

Methods

openapi

openapi(): RouteConfig

Returns

RouteConfig

Defined in

src/routing.ts:88