Workery / applications / App
Class: App<E>
Defined in: src/applications.ts:24
Extends
Router<E>
Type Parameters
E
E = unknown
Constructors
Constructor
new App<
E>(init):App<E>
Defined in: src/applications.ts:44
Parameters
init
rootPath?
string
title?
string
description?
string
version?
string
tagsInfo?
TagObject[]
servers?
ServerObject[]
contact?
ContactObject
license?
LicenseObject
termsOfService?
string
securitySchemes?
Record<string, SecuritySchemeObject>
security?
SecurityRequirementObject[]
openapiUrl?
null | string
swaggerUrl?
null | string
redocUrl?
null | string
middleware?
Middleware<E>[]
exceptionHandler?
tags?
string[]
deprecated?
boolean
includeInSchema?
boolean
responses?
Record<number, ResponseConfig>
defaultResponseClass?
Returns
App<E>
Overrides
Properties
rootPath
rootPath:
string
Defined in: src/applications.ts:25
title
title:
string
Defined in: src/applications.ts:26
description
description:
string
Defined in: src/applications.ts:27
version
version:
string
Defined in: src/applications.ts:28
tagsInfo
tagsInfo:
TagObject[]
Defined in: src/applications.ts:29
servers
servers:
ServerObject[]
Defined in: src/applications.ts:30
contact?
optionalcontact:ContactObject
Defined in: src/applications.ts:31
license?
optionallicense:LicenseObject
Defined in: src/applications.ts:32
termsOfService?
optionaltermsOfService:string
Defined in: src/applications.ts:33
securitySchemes
securitySchemes:
Record<string,SecuritySchemeObject>
Defined in: src/applications.ts:34
security
security:
SecurityRequirementObject[]
Defined in: src/applications.ts:35
Overrides
openapiUrl
openapiUrl:
null|string
Defined in: src/applications.ts:36
swaggerUrl
swaggerUrl:
null|string
Defined in: src/applications.ts:37
redocUrl
redocUrl:
null|string
Defined in: src/applications.ts:38
middleware
middleware:
Middleware<E>[]
Defined in: src/applications.ts:39
Overrides
exceptionHandler
exceptionHandler:
ExceptionHandler<E>
Defined in: src/applications.ts:40
fetch()
fetch: (
req,env,ctx) =>Promise<Response>
Defined in: src/applications.ts:223
Parameters
req
Request
env
E
ctx
ExecutionContext
Returns
Promise<Response>
tags
tags:
string[]
Defined in: src/routing.ts:340
Inherited from
deprecated
deprecated:
boolean
Defined in: src/routing.ts:341
Inherited from
includeInSchema
includeInSchema:
boolean
Defined in: src/routing.ts:342
Inherited from
responses
responses:
Record<number,ResponseConfig>
Defined in: src/routing.ts:343
Inherited from
defaultResponseClass
defaultResponseClass:
ResponseClass
Defined in: src/routing.ts:345
Inherited from
routeMatcher
routeMatcher:
RouteMatcher<E>
Defined in: src/routing.ts:347
Inherited from
Methods
include()
include(
pathPrefix,router):void
Defined in: src/applications.ts:121
Parameters
pathPrefix
string
router
Router<E>
Returns
void
openapi()
openapi():
OpenAPIObject
Defined in: src/applications.ts:132
Returns
OpenAPIObject
handle()
handle(
baseArgs):Promise<Response>
Defined in: src/applications.ts:158
Parameters
baseArgs
ArgsOf<{ }, E>
Returns
Promise<Response>
get()
get<
R,Ps>(path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:381
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>
Inherited from
post()
post<
R,Ps>(path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:387
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>
Inherited from
put()
put<
R,Ps>(path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:393
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>
Inherited from
delete()
delete<
R,Ps>(path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:399
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>
Inherited from
patch()
patch<
R,Ps>(path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:405
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>
Inherited from
head()
head<
R,Ps>(path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:411
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>
Inherited from
trace()
trace<
R,Ps>(path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:417
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>
Inherited from
options()
options<
R,Ps>(path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:423
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>
Inherited from
route()
route<
R,Ps>(method,path,unboundRoute):Route<R,Ps,E>
Defined in: src/routing.ts:430
Type Parameters
R
R
Ps
Ps extends RouteParameters
Parameters
method
path
string
unboundRoute
UnboundRoute<R, Ps, E>
Returns
Route<R, Ps, E>