-
Notifications
You must be signed in to change notification settings - Fork 136
/
ng-openapi-gen-schema.json
257 lines (257 loc) · 8.72 KB
/
ng-openapi-gen-schema.json
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
{
"$schema": "http://json-schema.org/schema",
"id": "https://github.com/cyclosproject/ng-openapi-gen/blob/master/ng-openapi-gen-schema.json",
"title": "Options for ng-openapi-gen",
"type": "object",
"required": [
"input"
],
"properties": {
"$schema": {
"type": "string"
},
"input": {
"description": "The input file or URL to the OpenAPI 3 specification, JSON or YAML, local file or URL",
"type": "string"
},
"output": {
"description": "Where generated files will be written to. Defaults to 'src/app/api'.",
"type": "string",
"default": "src/app/api"
},
"fetchTimeout": {
"description": "Indicates the timeout when fetching the input URL, in milliseconds. Defaults to 20 seconds (20000).",
"type": "number",
"default": 20000
},
"defaultTag": {
"description": "Tag name assumed for operations without tags. Defaults to 'Api'.",
"type": "string"
},
"includeTags": {
"description": "When specified, filters the generated services, including only those corresponding to this list of tags.",
"type": "array",
"items": {
"type": "string"
}
},
"excludeTags": {
"description": "When specified, filters the generated services, excluding any service corresponding to this list of tags.",
"type": "array",
"items": {
"type": "string"
}
},
"ignoreUnusedModels": {
"description": "Indicates whether or not to ignore model files that are not referenced by any operation. Defaults to true.",
"type": "boolean",
"default": true
},
"removeStaleFiles": {
"description": "Indicates whether or not to remove any files in the output folder that were not generated. Defaults to true.",
"type": "boolean",
"default": true
},
"modelIndex": {
"description": "Typescript file, without '.ts' extension that exports all models. Set to false to skip. Defaults to `models`.",
"default": "models",
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"services": {
"description": "When set to false, no services will be generated, only operation functions. Disabling services also disables the module and service index.",
"default": true,
"type": "boolean"
},
"serviceIndex": {
"description": "Typescript file, without '.ts' extension that exports all services. Set to false to skip. Defaults to `services`.",
"default": "services",
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"servicePrefix": {
"description": "Prefix for generated service classes. Defaults to empty.",
"type": "string",
"default": ""
},
"serviceSuffix": {
"description": "Suffix for generated service classes. Defaults to `Service`.",
"type": "string",
"default": "Service"
},
"modelPrefix": {
"description": "Prefix for generated model classes. Defaults to empty.",
"type": "string",
"default": ""
},
"modelSuffix": {
"description": "Suffix for generated model classes. Defaults to empty.",
"type": "string",
"default": ""
},
"configuration": {
"description": "Name for the configuration class to generate. Defaults to 'ApiConfiguration'.",
"type": "string",
"default": "ApiConfiguration"
},
"baseService": {
"description": "Name for the base service class to generate. Defaults to 'BaseService'.",
"type": "string",
"default": "BaseService"
},
"apiService": {
"description": "Name for the service to call functions directly. By default is not generated.",
"type": "string",
"default": ""
},
"requestBuilder": {
"description": "Name for the request builder class to generate. Defaults to 'RequestBuilder'.",
"type": "string",
"default": "RequestBuilder"
},
"response": {
"description": "Name for the response class to generate. Defaults to 'StrictHttpResponse'.",
"type": "string",
"default": "StrictHttpResponse"
},
"module": {
"description": "Class name of the module that provides all services. Set to false to skip. Defaults to `ApiModule`.",
"default": "ApiModule",
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"enumStyle": {
"description": "Determines how root enums will be generated. Possible values are:\n\n- `alias`: just generate a type alias with the possible values;\n- `upper` for an enum with UPPER_CASE names;\n- `pascal` for enum PascalCase names;\n- `ignorecase` for enum names that ignore character casing; Defaults to 'pascal'.",
"default": "pascal",
"enum": [
"alias",
"upper",
"pascal",
"ignorecase"
]
},
"enumArray": {
"description": "Should an array be exported for each model, in a file sibling to the enum definition?",
"default": false,
"type": "boolean"
},
"endOfLineStyle": {
"description": "Determines how to normalize line endings. Possible values are: `crlf`: normalize line endings to CRLF (Windows, DOS) => \\r\\n. `lf` normalize line endings to LF (Unix, OS X) => \\n. `cr` normalize line endings to CR (Mac OS) => \\r. `auto` normalize line endings for the current operating system. Defaults to 'auto'.",
"default": "auto",
"enum": [
"crlf",
"lf",
"cr",
"auto"
]
},
"templates": {
"description": "Custom templates directory. Any `.handlebars` files here will be used instead of the corresponding default.",
"type": "string"
},
"excludeParameters": {
"description": "When specified, ignores on generated services any parameters whose names are in this list.",
"type": "array",
"items": {
"type": "string"
}
},
"indexFile": {
"description": "When set to true, a index.ts file will be generated that exports all generated files.",
"default": false,
"type": "boolean"
},
"skipJsonSuffix": {
"description": "When specified, does not generate a $Json suffix.",
"default": false,
"type": "boolean"
},
"customizedResponseType": {
"type": "object",
"description": "Defines which paths to use which responseType, commonly used when build-in deduction can't fullfill your needs",
"minProperties": 1,
"patternProperties": {
".*": {
"required": [
"toUse"
],
"type": "object",
"properties": {
"toUse": {
"type": "string",
"enum": [
"arraybuffer",
"blob",
"json",
"document"
]
}
}
}
}
},
"useTempDir": {
"description": "When specified, will create temporary files in system temporary folder instead of output folder",
"default": false,
"type": "boolean"
},
"silent": {
"description": "When set to true, no verbose output will be displayed.",
"default": "false",
"type": "boolean"
},
"camelizeModelNames": {
"description": "When true (default) models names will be camelized, besides having the first letter capitalized. Setting to false will prevent camelizing.",
"default": "true",
"type": "boolean"
},
"keepFullResponseMediaType": {
"description": "When true, the expected response type in the request method names are not abbreviated and all response variants are kept.\\nWhen array is given, `mediaType` is expected to be a RegExp string matching the response media type. The first match in the array\\nwill decide whether or how to shorten the media type. If no mediaType is given, it will always match.\\n'short': application/x-spring-data-compact+json -> getEntities$Json\\n'tail': application/x-spring-data-compact+json -> getEntities$XSpringDataCompactJson\\n'full': application/x-spring-data-compact+json -> getEntities$ApplicationXSpringDataCompactJson",
"default": "false",
"anyOf": [
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "object",
"required": [
"use"
],
"properties": {
"mediaType": {
"type": "string"
},
"use": {
"enum": [
"full",
"tail",
"short"
]
}
}
}
}
]
}
}
}