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

tsoa-next / @tsoa-next/cli / DefaultRouteGenerator

الرتبة: مصمم طرق

محددة في: cli/src/routeGeneration/defaultRouteGenerator.ts:11

المولد الافتراضي للطريق Express.. Koaو Hapi نماذج

التذييلات

Constructors

المؤسسة

ts
new DefaultRouteGenerator(metadata, options): DefaultRouteGenerator;

محددة في: cli/src/routeGeneration/defaultRouteGenerator.ts:14

البارامترات

metadata

Metadata

options

ExtendedRoutesConfig

العودة

DefaultRouteGenerator

تجاوزات

AbstractRouteGenerator.constructor

الممتلكات

metadata

ts
protected readonly metadata: Metadata;

محددة في: cli/src/routeGeneration/routeGenerator.ts:13

Inherited from

AbstractRouteGenerator.metadata


options

ts
protected readonly options: ExtendedRoutesConfig;

محددة في: cli/src/routeGeneration/routeGenerator.ts:14

Inherited from

AbstractRouteGenerator.options


pathTransformerFn

ts
pathTransformerFn: (path) => string;

محددة في: cli/src/routeGeneration/defaultRouteGenerator.ts:12

البارامترات

path

string

العودة

string


template

ts
template: string;

محددة في: cli/src/routeGeneration/defaultRouteGenerator.ts:13

الطرائق

buildContent()

ts
buildContent(middlewareTemplate): string;

محددة في: cli/src/routeGeneration/defaultRouteGenerator.ts:69

يستأجر نموذج الطريق مع سياق البيانات الوصفية الحالي.

البارامترات

middlewareTemplate

string

العودة

string


buildContext()

ts
protected buildContext(): object;

محددة في: cli/src/routeGeneration/routeGenerator.ts:76

بناء Handlebars (ب) السياق النموذجي الذي تستخدمه نماذج الطرق غير المباشرة.

العودة

object

authenticationModule
ts
authenticationModule: string | undefined;
basePath
ts
basePath: string = normalisedBasePath;
canImportByAlias
ts
canImportByAlias: boolean;
controllers
ts
controllers: object[];
embeddedSpecGeneratorArtifacts
ts
embeddedSpecGeneratorArtifacts: 
  | {
  spec: Spec;
  yaml: string;
}
  | undefined;
environment
ts
environment: ProcessEnv = process.env;
esm
ts
esm: boolean | undefined;
existingGetPaths
ts
existingGetPaths: string[];
iocModule
ts
iocModule: string | undefined;
minimalSwaggerConfig
ts
minimalSwaggerConfig: object;
الحد الأدنى من المصارعة
ts
bodyCoercion: boolean;
الحد الأدنى من المواد الكيميائية
ts
noImplicitAdditionalProperties: "ignore" | "throw-on-extras" | "silently-remove-extras";
models
ts
models: Models;
multerOpts
ts
multerOpts: Options | undefined;
runtimeSpecConfig
ts
runtimeSpecConfig: 
  | {
  compilerOptions?: Record<string, unknown>;
  defaultNumberType?: "double" | "float" | "integer" | "long";
  ignore?: string[];
  metadata: Metadata;
  spec: SpecConfig & object;
}
  | undefined;
useFileUploads
ts
useFileUploads: boolean;
useSecurity
ts
useSecurity: boolean;
useSpecPaths
ts
useSpecPaths: boolean;

Inherited from

AbstractRouteGenerator.buildContext


buildEmbeddedSpecGeneratorArtifacts()

ts
protected buildEmbeddedSpecGeneratorArtifacts(useSpecPaths): 
  | {
  spec: Spec;
  yaml: string;
}
  | undefined;

محددة في: cli/src/routeGeneration/routeGenerator.ts:157

البارامترات

useSpecPaths

boolean

العودة

| { spec: Spec; yaml: string; } | undefined

Inherited from

AbstractRouteGenerator.buildEmbeddedSpecGeneratorArtifacts


buildModels()

ts
buildModels(): Models;

محددة في: cli/src/routeGeneration/routeGenerator.ts:23

يبني نموذج البيانات الفوقية التي يستهلكها معالجو الطرق المولدون.

العودة

Models

Inherited from

AbstractRouteGenerator.buildModels


buildParameterSchema()

ts
protected buildParameterSchema(source): ParameterSchema;

محددة في: cli/src/routeGeneration/routeGenerator.ts:199

البارامترات

source

Parameter

العودة

ParameterSchema

Inherited from

AbstractRouteGenerator.buildParameterSchema


buildProperty()

ts
protected buildProperty(type): PropertySchema;

محددة في: cli/src/routeGeneration/routeGenerator.ts:219

البارامترات

type

Type

العودة

PropertySchema

Inherited from

AbstractRouteGenerator.buildProperty


buildPropertySchema()

ts
protected buildPropertySchema(source): PropertySchema;

محددة في: cli/src/routeGeneration/routeGenerator.ts:188

البارامترات

source

Property

العودة

PropertySchema

Inherited from

AbstractRouteGenerator.buildPropertySchema


GenerateCustomRoutes()

ts
GenerateCustomRoutes(): Promise<void>;

محددة في: cli/src/routeGeneration/defaultRouteGenerator.ts:37

ويضع ملف النموذج المختار ويولد ناتج الطريق.

العودة

Promise<void>

تجاوزات

AbstractRouteGenerator.GenerateCustomRoutes


GenerateRoutes()

ts
GenerateRoutes(middlewareTemplate): Promise<void>;

محددة في: cli/src/routeGeneration/defaultRouteGenerator.ts:44

يكتب ملف الطريق المولد إلى القرص

البارامترات

middlewareTemplate

string

العودة

Promise<void>


getRelativeImportPath()

ts
protected getRelativeImportPath(fileLocation): string;

محددة في: cli/src/routeGeneration/routeGenerator.ts:176

البارامترات

fileLocation

string

العودة

string

Inherited from

AbstractRouteGenerator.getRelativeImportPath


pathTransformer()

ts
protected pathTransformer(path): string;

محددة في: cli/src/routeGeneration/defaultRouteGenerator.ts:64

البارامترات

path

string

العودة

string

تجاوزات

AbstractRouteGenerator.pathTransformer


shouldWriteFile()

ts
protected shouldWriteFile(fileName, content): Promise<boolean>;

محددة في: cli/src/routeGeneration/routeGenerator.ts:263

البارامترات

fileName

string

content

string

العودة

Promise<boolean>

Inherited from

AbstractRouteGenerator.shouldWriteFile

Contributors

No contributors

Changelog

No recent changes

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