forked from acacode/swagger-typescript-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
48 lines (38 loc) · 1.01 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
interface GenerateApiParams {
/**
* path to swagger schema
*/
input: string;
/**
* url to swagger schema
*/
url: string;
/**
* default 'api.ts'
*/
name?: string;
/**
* path to folder where will been located the created api module
*/
output?: string;
/**
* generate type definitions for API routes (default: false)
*/
generateRouteTypes?: boolean;
/**
* do not generate an API class
*/
generateClient?: boolean;
/**
* use "default" response status code as success response too.
* some swagger schemas use "default" response status code as success response type by default.
*/
defaultResponseAsSuccess?: boolean;
/**
* generate additional information about request responses
* also add typings for bad responses
*/
generateResponses?: boolean;
}
export declare function generateApi(params: Omit<GenerateApiParams, "url">): Promise<string>
export declare function generateApi(params: Omit<GenerateApiParams, "input">): Promise<string>