UNPKG

@infinite-debugger/swagger-to-ts

Version:

swagger-to-ts is a powerful library that allows you to generate TypeScript code from Swagger documentation or OpenAPI specifications. It simplifies the process of integrating API definitions into your TypeScript projects, saving you time and effort.

41 lines (40 loc) 1.57 kB
import { OpenAPISpecification, RequestGroupings, TSEDControllersCodeConfiguration, TagNameToEntityLabelsMap } from '../models'; export interface GenerateTSEDControllersCodeConfigurationOptions { /** * The request groupings to generate code for. */ requestGroupings: RequestGroupings; /** * The tag to entity label mappings. */ tagToEntityLabelMappings: TagNameToEntityLabelsMap; /** * The schema to entity mappings. */ schemaToEntityMappings: Record<string, string>; /** * The path to the tsed authenticate decorator import. */ authenticateDecoratorImportPath?: string; /** * The path to the tsed authorize decorator import. */ authorizeDecoratorImportPath?: string; /** * The prefix to add to the controller names. */ tsedControllerNamePrefix?: string; /** * The suffix to add to the controller names. */ tsedControllerNameSuffix?: string; /** * Whether to propagate request headers to the API function calls. */ propagateRequestHeaders?: boolean; /** * The OpenAPI specification. */ openAPISpecification: OpenAPISpecification; } export declare const getTSEDControllersCodeConfiguration: ({ requestGroupings, tagToEntityLabelMappings, schemaToEntityMappings, authenticateDecoratorImportPath, authorizeDecoratorImportPath, tsedControllerNamePrefix, tsedControllerNameSuffix, propagateRequestHeaders, openAPISpecification, }: GenerateTSEDControllersCodeConfigurationOptions) => TSEDControllersCodeConfiguration;