-
Notifications
You must be signed in to change notification settings - Fork 6k
Expand file tree
/
Copy pathopenapi.yaml
More file actions
509 lines (509 loc) · 15.6 KB
/
openapi.yaml
File metadata and controls
509 lines (509 loc) · 15.6 KB
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
openapi: 3.0.1
servers:
- url: /api
info:
description: 'This is an online swagger codegen server. You can find out more at
https://github.com/swagger-api/swagger-codegen or on [irc.freenode.net, #swagger](http://swagger.io/irc/).'
version: 3.0.78-SNAPSHOT
title: Swagger Generator
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
tags:
- name: clients
- name: servers
- name: documentation
- name: config
paths:
"/generate":
get:
tags:
- clients
- servers
- documentation
- config
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: generateFromURL
summary: Generates and download code. GenerationRequest input provided as JSON
available at URL specified in parameter codegenOptionsURL.
parameters:
- name: codegenOptionsURL
in: query
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/octet-stream:
schema:
type: string
format: binary
post:
tags:
- clients
- servers
- documentation
- config
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: generate
summary: Generates and download code. GenerationRequest input provided as request
body.
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/GenerationRequest"
responses:
'200':
description: successful operation
content:
application/octet-stream:
schema:
type: string
format: binary
"/clients":
get:
tags:
- clients
- documentation
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: clientLanguages
deprecated: true
summary: Deprecated, use '/{type}/{version}' instead. List generator languages of type 'client' or 'documentation' for given codegen version (defaults to V3)
parameters:
- "$ref": "#/components/parameters/version"
- name: clientOnly
in: query
description: flag to only return languages of type `client`
schema:
type: boolean
default: false
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: string
"/servers":
get:
tags:
- servers
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: serverLanguages
deprecated: true
summary: Deprecated, use '/{type}/{version}' instead. List generator languages of type 'server' for given codegen version (defaults to V3)
parameters:
- "$ref": "#/components/parameters/version"
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: string
"/documentation":
get:
tags:
- documentation
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: documentationLanguages
deprecated: true
summary: Deprecated, use '/{type}/{version}' instead. List generator languages of type 'documentation' for given codegen version (defaults to V3)
parameters:
- "$ref": "#/components/parameters/version"
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: string
"/{type}/{version}":
get:
tags:
- clients
- servers
- documentation
- config
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: languages
summary: List generator languages of the given type and version
parameters:
- "$ref": "#/components/parameters/type"
- name: version
in: path
required: true
description: generator version used by codegen engine
schema:
type: string
enum:
- V2
- V3
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: string
"/types":
get:
tags:
- clients
- servers
- documentation
- config
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: languagesMulti
summary: List generator languages of version defined in 'version parameter (defaults to V3) and type included in 'types' parameter; all languages
parameters:
- "$ref": "#/components/parameters/types"
- "$ref": "#/components/parameters/version"
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: string
"/options":
get:
tags:
- clients
- servers
- documentation
- config
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: listOptions
summary: Returns options for a given language and version (defaults to V3)
parameters:
- name: language
in: query
description: language
schema:
type: string
- "$ref": "#/components/parameters/version"
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: "object"
additionalProperties:
$ref: "#/components/schemas/CliOption"
"/model":
post:
tags:
- clients
- servers
- documentation
- config
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: generateBundle
summary: Generates the intermediate model ("bundle") and returns it as a JSON.
body.
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/GenerationRequest"
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
"/render":
post:
tags:
- documentation
x-swagger-router-controller: io.swagger.v3.generator.online.GeneratorController
operationId: renderTemplate
summary: render a template using the provided data
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/RenderRequest"
responses:
'200':
description: successful operation
content:
application/json:
schema:
"$ref": "#/components/schemas/RenderResponse"
components:
parameters:
version:
name: version
in: query
description: generator version used by codegen engine
schema:
type: string
enum:
- V2
- V3
type:
name: type
in: path
required: true
description: generator type
schema:
type: string
enum:
- client
- server
- documentation
- config
types:
name: types
in: query
style: form
explode: false
required: true
description: comma-separated list of generator types
schema:
type: array
items:
type: string
enum:
- client
- server
- documentation
- config
schemas:
GenerationRequest:
x-swagger-router-model: io.swagger.codegen.v3.service.GenerationRequest
required:
- lang
properties:
lang:
type: string
title: language
description: language to generate (required)
example: java
spec:
type: object
description: spec in json format. . Alternative to `specURL`
specURL:
type: string
description: URL of the spec in json format. Alternative to `spec`
type:
type: string
description: type of the spec
enum:
- CLIENT
- SERVER
- DOCUMENTATION
- CONFIG
codegenVersion:
type: string
description: codegen version to use
enum:
- V2
- V3
options:
"$ref": "#/components/schemas/Options"
AuthorizationValue:
x-swagger-router-model: io.swagger.v3.parser.core.models.AuthorizationValue
title: authorization
description: adds authorization headers when fetching the open api definitions
remotely. Pass in an authorizationValue object
properties:
value:
type: string
description: Authorization value
keyName:
type: string
description: Authorization key
type:
type: string
description: Authorization type
enum:
- query
- header
Options:
x-swagger-router-model: io.swagger.codegen.v3.service.Options
properties:
auth:
type: string
title: authorization
description: adds authorization headers when fetching the open api definitions
remotely. Pass in a URL-encoded string of name:header with a comma separating
multiple values
authorizationValue:
"$ref": "#/components/schemas/AuthorizationValue"
apiPackage:
type: string
title: api package
description: package for generated api classes
templateVersion:
type: string
title: Template Version
description: template version for generation
modelPackage:
type: string
title: model package
description: package for generated models
modelNamePrefix:
type: string
title: model name prefix
description: Prefix that will be prepended to all model names. Default is
the empty string.
modelNameSuffix:
type: string
title: model name suffix
description: PrefixSuffix that will be appended to all model names. Default
is the empty string.
systemProperties:
type: object
additionalProperties:
type: string
title: System Properties
description: sets specified system properties in key/value format
instantiationTypes:
type: object
additionalProperties:
type: string
title: instantiation types
description: 'sets instantiation type mappings in key/value format. For
example (in Java): array=ArrayList,map=HashMap. In other words array types
will get instantiated as ArrayList in generated code.'
typeMappings:
type: object
additionalProperties:
type: string
title: type mappings
description: 'sets mappings between swagger spec types and generated code
types in key/value format. For example: array=List,map=Map,string=String.'
additionalProperties:
type: object
additionalProperties:
type: object
title: additional properties
description: sets additional properties that can be referenced by the mustache
templates in key/value format.
languageSpecificPrimitives:
type: array
items:
type: string
title: language specific primitives
description: 'specifies additional language specific primitive types in
the format of type1,type2,type3,type3. For example: String,boolean,Boolean,Double.
You can also have multiple occurrences of this option.'
importMappings:
type: object
additionalProperties:
type: string
title: import mappings
description: specifies mappings between a given class and the import that
should be used for that class in key/value format.
invokerPackage:
type: string
title: invoker package
description: root package for generated code
groupId:
type: string
title: group id
description: groupId in generated pom.xml
artifactId:
type: string
title: artifact id
description: artifactId in generated pom.xml
artifactVersion:
type: string
title: artifact version
description: artifact version generated in pom.xml
library:
type: string
title: library
description: library template (sub-template)
gitUserId:
type: string
title: git user id
description: Git user ID, e.g. swagger-api.
gitRepoId:
type: string
title: git repo id
description: Git repo ID, e.g. swagger-codegen.
releaseNote:
type: string
title: release note
description: Release note, default to 'Minor update'.
httpUserAgent:
type: string
title: http user agent
description: HTTP user agent, e.g. codegen_csharp_api_client, default to
'Swagger-Codegen/{packageVersion}}/{language}'
reservedWordsMappings:
type: object
additionalProperties:
type: string
title: reserved words mappings
description: pecifies how a reserved name should be escaped to. Otherwise,
the default _<name> is used. For example id=identifier.
ignoreFileOverride:
type: string
title: ignore file override location
description: Specifies an override location for the .swagger-codegen-ignore
file. Most useful on initial generation.
removeOperationIdPrefix:
type: boolean
title: remove prefix of the operationId
description: Remove prefix of operationId, e.g. config_getId => getId
skipOverride:
type: boolean
CliOption:
type: "object"
properties:
optionName:
type: "string"
description:
type: "string"
type:
type: "string"
description: "Data type is based on the types supported by the JSON-Schema"
enum:
type: "object"
additionalProperties:
type: "string"
default:
type: "string"
RenderRequest:
x-swagger-router-model: io.swagger.codegen.v3.service.RenderRequest
required:
- template
- context
properties:
template:
type: string
title: template
description: template as string
example: "{{!mustache}}"
context:
type: string
title: context
description: context as string
example: "{}"
RenderResponse:
x-swagger-router-model: io.swagger.codegen.v3.service.RenderResponse
required:
- value
properties:
value:
type: string