Skip to content

Latest commit

 

History

History
195 lines (113 loc) · 7.4 KB

File metadata and controls

195 lines (113 loc) · 7.4 KB

api-typescript-generator / Modules / index

Module: index

Table of contents

Interfaces

Type Aliases

Variables

Type Aliases

CommonApiToTypescriptGeneratorSource

Ƭ CommonApiToTypescriptGeneratorSource: { path: string ; type: "file" } | { type: "url" ; url: string } | { object: unknown ; type: "object" } | { data: string ; type: "string" }

Source of the API to generate TypeScript types from. Can be a file or a URL. Supports both YAML and JSON.


EntityNameCase

Ƭ EntityNameCase: "kebabCase" | "camelCase" | "snakeCase" | "pascalCase"


OpenApiDocumentPatchAllSchemas

Ƭ OpenApiDocumentPatchAllSchemas: (schemas: { [schemaName: string]: OpenApiSchema; }) => { [schemaName: string]: OpenApiSchema; } | Promise<{ [schemaName: string]: OpenApiSchema; }>

Type declaration

▸ (schemas): { [schemaName: string]: OpenApiSchema; } | Promise<{ [schemaName: string]: OpenApiSchema; }>

Callback to patch all schemas.

Parameters
Name Type Description
schemas Object The schemas to patch.
Returns

{ [schemaName: string]: OpenApiSchema; } | Promise<{ [schemaName: string]: OpenApiSchema; }>


OpenApiDocumentPatchDocument

Ƭ OpenApiDocumentPatchDocument: (document: OpenApiDocument) => OpenApiDocument | Promise<OpenApiDocument>

Type declaration

▸ (document): OpenApiDocument | Promise<OpenApiDocument>

Callback to patch the whole OpenAPI document. Applies after all other patches.

Parameters
Name Type Description
document OpenApiDocument The OpenAPI document to patch.
Returns

OpenApiDocument | Promise<OpenApiDocument>


OpenApiDocumentPatchOperation

Ƭ OpenApiDocumentPatchOperation: (operation: OpenApiOperation, path: string, httpMethod: OpenApiHttpMethod) => OpenApiOperation | Promise<OpenApiOperation>

Type declaration

▸ (operation, path, httpMethod): OpenApiOperation | Promise<OpenApiOperation>

Callback to patch an operation.

Parameters
Name Type Description
operation OpenApiOperation The operation to patch.
path string The path of the operation.
httpMethod OpenApiHttpMethod -
Returns

OpenApiOperation | Promise<OpenApiOperation>


OpenApiDocumentPatchPathItem

Ƭ OpenApiDocumentPatchPathItem: (pathItem: OpenApiPathItem, path: string) => OpenApiPathItem | Promise<OpenApiPathItem>

Type declaration

▸ (pathItem, path): OpenApiPathItem | Promise<OpenApiPathItem>

Callback to patch a path item.

Parameters
Name Type Description
pathItem OpenApiPathItem The path item to patch.
path string The path of the path item.
Returns

OpenApiPathItem | Promise<OpenApiPathItem>


OpenApiDocumentPatchSchema

Ƭ OpenApiDocumentPatchSchema: (schema: OpenApiSchema, schemaName: string) => OpenApiSchema | Promise<OpenApiSchema>

Type declaration

▸ (schema, schemaName): OpenApiSchema | Promise<OpenApiSchema>

Callback to patch a schema.

Parameters
Name Type Description
schema OpenApiSchema The schema to patch.
schemaName string The name of the schema.
Returns

OpenApiSchema | Promise<OpenApiSchema>


OpenApiDocumentPatchTags

Ƭ OpenApiDocumentPatchTags: (tags: OpenApiTag[]) => OpenApiTag[] | Promise<OpenApiTag[]>

Type declaration

▸ (tags): OpenApiTag[] | Promise<OpenApiTag[]>

Callback to patch tags.

Parameters
Name Type Description
tags OpenApiTag[] The tags to patch.
Returns

OpenApiTag[] | Promise<OpenApiTag[]>


OpenApiSchemaFieldPathItem

Ƭ OpenApiSchemaFieldPathItem: string | typeof stringIndexSignature

Path item used to reference a path to a field in the schema.

Variables

stringIndexSignature

Const stringIndexSignature: typeof stringIndexSignature