mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
42 lines
928 B
TypeScript
42 lines
928 B
TypeScript
export declare enum HttpClient {
|
|
FETCH = 'fetch',
|
|
XHR = 'xhr',
|
|
NODE = 'node',
|
|
AXIOS = 'axios',
|
|
ANGULAR = 'angular',
|
|
}
|
|
|
|
export declare enum Indent {
|
|
SPACE_4 = '4',
|
|
SPACE_2 = '2',
|
|
TAB = 'tab',
|
|
}
|
|
|
|
export type Options = {
|
|
input: string | Record<string, any>;
|
|
output: string;
|
|
httpClient?: HttpClient | 'fetch' | 'xhr' | 'node' | 'axios' | 'angular';
|
|
clientName?: string;
|
|
useOptions?: boolean;
|
|
useUnionTypes?: boolean;
|
|
exportCore?: boolean;
|
|
exportServices?: boolean;
|
|
exportModels?: boolean;
|
|
exportSchemas?: boolean;
|
|
indent?: Indent | '4' | '2' | 'tab';
|
|
postfixServices?: string;
|
|
postfixModels?: string;
|
|
request?: string;
|
|
write?: boolean;
|
|
};
|
|
|
|
export declare function generate(options: Options): Promise<void>;
|
|
|
|
declare type OpenAPI = {
|
|
HttpClient: HttpClient;
|
|
Indent: Indent;
|
|
generate: typeof generate;
|
|
};
|
|
|
|
export default OpenAPI;
|