forked from lukeautry/tsoa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.ts
81 lines (67 loc) · 1.49 KB
/
config.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
export interface Config {
/**
* Swagger generation configuration object
*/
swagger: SwaggerConfig;
/**
* Route generation configuration object
*/
routes: RoutesConfig;
}
export interface SwaggerConfig {
/**
* Generated SwaggerConfig.json will output here
*/
outputDirectory: string;
/**
* The entry point to your API
*/
entryFile: string;
/**
* API host, expressTemplate.g. localhost:3000 or https://myapi.com
*/
host?: string;
/**
* API version number; defaults to npm package version
*/
version?: string;
/**
* API name; defaults to npm package name
*/
name?: string;
/**
* 'API description; defaults to npm package description
*/
description?: string;
/**
* API license; defaults to npm package license
*/
license?: string;
/**
* Base API path; e.g. the 'v1' in https://myapi.com/v1
*/
basePath?: string;
/**
* Extend generated swagger spec with this object
* Note that generated properties will always take precedence over what get specified here
*/
spec?: any;
}
export interface RoutesConfig {
/**
* Routes directory; generated routes.ts (which contains the generated code wiring up routes using middleware of choice) will be dropped here
*/
routesDir: string;
/**
* The entry point to your API
*/
entryFile: string;
/**
* Base API path; e.g. the '/v1' in https://myapi.com/v1
*/
basePath?: string;
/**
* Middleware provider
*/
middleware?: 'express';
}