UNPKG

openapi-ts-generator

Version:

Based on swagger-ts-generator, this is a type script model generator specifically for services with OpenApi spec documentation.

34 lines (33 loc) 1.5 kB
import { ILogger } from './logger'; import { IEntity } from './entity'; import { IReferenceProperty } from './reference-property'; import { IValueProperty } from './value-property'; import { AxiosRequestConfig } from 'axios'; export interface IGeneratorOptions { logger?: ILogger; outputPath: string; openApiJsonUrl?: string; openApiJsonFileName?: string; genAngularFormGroups?: boolean; genAngularFormGroupsWithDefaultValues?: boolean; genClasses?: boolean; typeFilterCallBack?: (entity: IEntity, index: number, array: IEntity[]) => boolean; valuePropertyTypeFilterCallBack?: (valueProperty: IValueProperty, index: number, array: IValueProperty[]) => boolean; referencePropertyTypeFilterCallBack?: (referenceProperty: IReferenceProperty, index: number, array: IReferenceProperty[]) => boolean; pathUrlFormattingCallBack?: (url: string) => string; templates?: ITemplates | null; axiosConfig?: AxiosRequestConfig<unknown>; } export interface ITemplates { model?: string; entity?: string; testObjectFactory?: string; form?: string; formGroupFactory?: string; modelProperties?: string; barrel?: string; enum?: string; endpoints?: string; } export declare function defaultFilter(_value: IEntity | IValueProperty | IReferenceProperty, _index: number, _array: IEntity[] | IValueProperty[] | IReferenceProperty[]): boolean; export declare function setGeneratorOptionDefaults(options: IGeneratorOptions): IGeneratorOptions;