تخطي إلى المحتوى

tsoa-next / @tsoa-next/runtime / KoaTemplateService

الفئة: KoaTemplateService ​

محددة في: packages/runtime/src/routeGeneration/templates/koa/koaTemplateService.ts:39

Koa- التنفيذ المحدد لعقد خدمات نموذج المسار المولد.

التذييلات ​

  • TemplateService<KoaApiHandlerParameters, KoaValidationArgsParameters, KoaReturnHandlerParameters>

Constructors ​

المؤسسة ​

ts
new KoaTemplateService(models, config): KoaTemplateService;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:12

البارامترات ​

models ​

Models

config ​

AdditionalProps

العودة ​

KoaTemplateService

Inherited from ​

TemplateService.constructor

الممتلكات ​

config ​

ts
protected readonly config: AdditionalProps;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:14

Inherited from ​

TemplateService.config


models ​

ts
protected readonly models: Models;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:13

Inherited from ​

TemplateService.models


validationService ​

ts
protected validationService: ValidationService;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:10

Inherited from ​

TemplateService.validationService

الطرائق ​

apiHandler() ​

ts
apiHandler(params): Promise<void | Context>;

محددة في: packages/runtime/src/routeGeneration/templates/koa/koaTemplateService.ts:40

يَدْفعُ عملَ المتحكمِ للظهورِ النشطِ.

البارامترات ​

params ​

KoaApiHandlerParameters

العودة ​

Promise<void | Context>

تجاوزات ​

TemplateService.apiHandler


buildPromise() ​

ts
protected buildPromise(
   methodName, 
   controller, 
validatedArgs): Promise<unknown>;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:77

البارامترات ​

methodName ​

string

controller ​

object | Controller

validatedArgs ​

unknown[]

العودة ​

Promise<unknown>

Inherited from ​

TemplateService.buildPromise


getBodyProperty() ​

ts
protected getBodyProperty(
   body, 
   headers, 
   propertyName): unknown;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:62

البارامترات ​

body ​

unknown

headers ​

Record<string, unknown>

propertyName ​

string

العودة ​

unknown

Inherited from ​

TemplateService.getBodyProperty


getValidatedArgs() ​

ts
getValidatedArgs(params): unknown[];

محددة في: packages/runtime/src/routeGeneration/templates/koa/koaTemplateService.ts:64

ويقيم ويطبيع الحجج المستقاة من الطلب.

البارامترات ​

params ​

KoaValidationArgsParameters

العودة ​

unknown[]

تجاوزات ​

TemplateService.getValidatedArgs


isController() ​

ts
protected isController(object): object is Controller;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:28

البارامترات ​

object ​

object | Controller

العودة ​

object is Controller

Inherited from ​

TemplateService.isController


isRecord() ​

ts
protected isRecord(value): value is Record<string, unknown>;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:73

البارامترات ​

value ​

unknown

العودة ​

value is Record<string, unknown>

Inherited from ​

TemplateService.isRecord


normalizeRequestBody() ​

ts
protected normalizeRequestBody(body, headers): unknown;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:54

البارامترات ​

body ​

unknown

headers ​

Record<string, unknown>

العودة ​

unknown

Inherited from ​

TemplateService.normalizeRequestBody


requestHasBody() ​

ts
protected requestHasBody(headers): boolean;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:32

البارامترات ​

headers ​

Record<string, unknown>

العودة ​

boolean

Inherited from ​

TemplateService.requestHasBody


requestUsesTransferEncoding() ​

ts
protected requestUsesTransferEncoding(headers): boolean;

محددة في: packages/runtime/src/routeGeneration/templates/templateService.ts:50

البارامترات ​

headers ​

Record<string, unknown>

العودة ​

boolean

Inherited from ​

TemplateService.requestUsesTransferEncoding


returnHandler() ​

ts
protected returnHandler(params): Promise<void> | Context | undefined;

محددة في: packages/runtime/src/routeGeneration/templates/koa/koaTemplateService.ts:134

يكتب المتحكم يعود إلى العمل

البارامترات ​

params ​

KoaReturnHandlerParameters

العودة ​

Promise<void> | Context | undefined

تجاوزات ​

TemplateService.returnHandler

Contributors

No contributors

Changelog

No recent changes

توليد OpenAPI وتوليد المسارات والتحقق وقت التشغيل مع اعتماد TypeScript أولاً.