UNPKG

openapi-codegen-typescript

Version:

OpenApi codegen for generating types an mocks from swagger json file

38 lines (37 loc) 1.26 kB
import { ConvertToMocksProps, EnumSchema, GetSchemasProps } from './types'; /** * Get all interfaces that this schema exteds * @param schema DTO schema * @param DTOs all DTOs */ export declare const getSchemaInterfaces: (schema: any, DTOs: any) => string[] | undefined; interface CombinePropertiesProps { schema: any; schemas: any; interfaces: Array<string>; } /** * Combines all properties from extended DTOs into one object. * * @param schema * @param schemas * @param interfaces */ export declare const combineProperties: ({ schema, schemas, interfaces }: CombinePropertiesProps) => any; interface ParseSchemaProps { schema: any; /** * DTO name * Examples: MembersEmailDto, InviteMembersRequestDto, InviteAssetsMembersRequestDto */ name: string; /** * All parsed DTOs from swagger json file */ DTOs?: any; overrideSchemas?: Array<EnumSchema>; } export declare const parseSchema: ({ schema, name, DTOs, overrideSchemas }: ParseSchemaProps) => string; export declare const parseSchemas: ({ json, overrideSchemas }: GetSchemasProps) => string; export declare const convertToMocks: ({ json, fileName, folderPath, typesPath, overrideSchemas, }: ConvertToMocksProps) => string; export {};