-
-
Notifications
You must be signed in to change notification settings - Fork 205
Expand file tree
/
Copy pathconfig.schema.json
More file actions
528 lines (528 loc) · 20.2 KB
/
config.schema.json
File metadata and controls
528 lines (528 loc) · 20.2 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
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
{
"$id": "https://openapitools.org/openapi-generator-cli/config.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "OpenAPI Generator CLI - Config",
"type": "object",
"required": ["generator-cli"],
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string"
},
"spaces": {
"type": "number",
"default": 2
},
"generator-cli": {
"type": "object",
"required": ["version"],
"properties": {
"version": {
"type": "string"
},
"storageDir": {
"type": "string"
},
"repository": {
"queryUrl": {
"type": "string",
"default": "https://central.sonatype.com/solrsearch/select?q=g:${group.id}+AND+a:${artifact.id}&core=gav&start=0&rows=200"
},
"downloadUrl": {
"type": "string",
"default": "https://repo1.maven.org/maven2/${groupId}/${artifactId}/${versionName}/${artifactId}-${versionName}.jar"
},
"username": {
"type": "string",
"description": "Username for authenticating against the maven repository. Supports ${env.VAR_NAME} placeholders."
},
"password": {
"type": "string",
"description": "Password for authenticating against the maven repository. Supports ${env.VAR_NAME} placeholders."
}
},
"useDocker": {
"type": "boolean",
"default": false
},
"dockerImageName": {
"type": "string",
"default": "openapitools/openapi-generator-cli"
},
"generators": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/generator"
}
}
}
}
},
"definitions": {
"strOrAnyObject": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
]
},
"generator": {
"type": "object",
"anyOf": [
{
"required": ["inputSpec", "output", "generatorName"]
},
{
"required": ["glob", "output", "generatorName"]
}
],
"properties": {
"glob": {
"description": "matches local specification files using a glob pattern",
"type": "string",
"minLength": 1
},
"output": {
"type": "string",
"minLength": 1
},
"disabled": {
"type": "boolean",
"default": false
},
"generatorName": {
"description": "generator to use (see list command for list)",
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [
"ada",
"ada-server",
"android",
"apache2",
"apex",
"asciidoc",
"aspnetcore",
"avro-schema",
"bash",
"c",
"clojure",
"cpp-pistache-server",
"cpp-qt5-client",
"cpp-qt5-qhttpengine-server",
"cpp-restbed-server",
"cpp-restsdk",
"cpp-tizen",
"csharp",
"csharp-nancyfx",
"csharp-netcore",
"cwiki",
"dart",
"dart-dio",
"dart-jaguar",
"dynamic-html",
"eiffel",
"elixir",
"elm",
"erlang-client",
"erlang-proper",
"erlang-server",
"flash",
"fsharp-functions",
"fsharp-giraffe-server",
"go",
"go-experimental",
"go-gin-server",
"go-server",
"graphql-nodejs-express-server",
"graphql-schema",
"groovy",
"haskell",
"haskell-http-client",
"html",
"html2",
"java",
"java-inflector",
"java-msf4j",
"java-pkmst",
"java-play-framework",
"java-undertow-server",
"java-vertx",
"java-vertx-web",
"javascript",
"javascript-apollo",
"javascript-closure-angular",
"javascript-flowtyped",
"jaxrs-cxf",
"jaxrs-cxf-cdi",
"jaxrs-cxf-client",
"jaxrs-cxf-extended",
"jaxrs-jersey",
"jaxrs-resteasy",
"jaxrs-resteasy-eap",
"jaxrs-spec",
"jmeter",
"k6",
"kotlin",
"kotlin-server",
"kotlin-spring",
"kotlin-vertx",
"lua",
"markdown",
"mysql-schema",
"nim",
"nodejs-express-server",
"objc",
"ocaml",
"openapi",
"openapi-yaml",
"perl",
"php",
"php-laravel",
"php-lumen",
"php-silex",
"php-slim4",
"php-symfony",
"php-ze-ph",
"powershell",
"powershell-experimental",
"protobuf-schema",
"python",
"python-aiohttp",
"python-blueplanet",
"python-experimental",
"python-flask",
"r",
"ruby",
"ruby-on-rails",
"ruby-sinatra",
"rust",
"rust-server",
"scala-akka",
"scala-akka-http-server",
"scala-finch",
"scala-gatling",
"scala-lagom-server",
"scala-play-server",
"scala-sttp",
"scalatra",
"scalaz",
"spring",
"swift4",
"swift5",
"typescript-angular",
"typescript-angularjs",
"typescript-aurelia",
"typescript-axios",
"typescript-fetch",
"typescript-inversify",
"typescript-jquery",
"typescript-node",
"typescript-redux-query",
"typescript-rxjs"
]
}
]
},
"auth": {
"type": "string",
"description": "adds authorization headers when fetching the OpenAPI definitions remotely. Pass in a URL-encoded string of name:header with a comma separating multiple values"
},
"apiNameSuffix": {
"type": "string",
"description": "suffix that will be appended to all API names ('tags'). Default: Api. e.g. Pet => PetApi. Note: Only ruby, python, jaxrs generators support this feature at the moment"
},
"apiPackage": {
"type": "string",
"description": "package for generated api classes"
},
"artifactId": {
"type": "string",
"description": "artifactId in generated pom.xml. This also becomes part of the generated library's filename"
},
"artifactVersion": {
"type": "string",
"description": "artifact version in generated pom.xml. This also becomes part of the generated library's filename"
},
"config": {
"type": "string",
"description": "path to configuration file. It can be JSON or YAML"
},
"dryRun": {
"type": "boolean",
"description": "try things out and report on potential changes (without actually making changes)"
},
"engine": {
"type": "string",
"enum": ["mustache", "handlebars"],
"description": "templating engine: \"mustache\" (default) or \"handlebars\" (beta)"
},
"enablePostProcessFile": {
"type": "boolean",
"description": "enable post-processing file using environment variables"
},
"generateAliasAsModel": {
"type": "boolean",
"description": "generate model implementation for aliases to map and array schemas. An 'alias' is an array, map, or list which is defined inline in a OpenAPI document and becomes a model in the generated code. A 'map' schema is an object that can have undeclared properties, i.e. the 'additionalproperties' attribute is set on that object. An 'array' schema is a list of sub schemas in a OAS document"
},
"gitHost": {
"type": "string",
"description": "git host, e.g. gitlab.com"
},
"gitRepoId": {
"type": "string",
"description": "git repo ID, e.g. openapi-generator"
},
"gitUserId": {
"type": "string",
"description": "git user ID, e.g. openapitools"
},
"globalProperty": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
],
"description": "sets specified global properties (previously called 'system properties') in the format of name=value,name=value (or multiple options, each with name=value)"
},
"groupId": {
"type": "string",
"description": "groupId in generated pom.xml"
},
"httpUserAgent": {
"type": "string",
"description": "HTTP user agent, e.g. codegen_csharp_api_client, default to 'OpenAPI-Generator/{packageVersion}}/{language}'"
},
"inputSpec": {
"type": "string",
"description": "location of the OpenAPI spec, as URL or file (required if not loaded via config using -c)"
},
"ignoreFileOverride": {
"type": "string",
"description": "specifies an override location for the .openapi-generator-ignore file. Most useful on initial generation.\n"
},
"importMappings": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
],
"description": "specifies mappings between a given class and the import that should be used for that class in the format of type=import,type=import. You can also have multiple occurrences of this option"
},
"instantiationTypes": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
],
"description": "sets instantiation type mappings in the format of type=instantiatedType,type=instantiatedType.For example (in Java): array=ArrayList,map=HashMap. In other words array types will get instantiated as ArrayList in generated code. You can also have multiple occurrences of this option"
},
"invokerPackage": {
"type": "string",
"description": "root package for generated code"
},
"languageSpecificPrimitives": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
],
"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"
},
"legacyDiscriminatorBehavior": {
"type": "boolean",
"description": "this flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}"
},
"library": {
"type": "string",
"description": "library template (sub-template)"
},
"logToStderr": {
"type": "boolean",
"description": "write all log messages (not just errors) to STDOUT. Useful for piping the JSON output of debug options (e.g. `-DdebugOperations`) to an external parser directly while testing a generator"
},
"minimalUpdate": {
"type": "boolean",
"description": "only write output files that have changed"
},
"modelNamePrefix": {
"type": "string",
"description": "prefix that will be prepended to all model names"
},
"modelNameSuffix": {
"type": "string",
"description": "suffix that will be appended to all model names"
},
"modelPackage": {
"type": "string",
"description": "package for generated models"
},
"additionalProperties": {
"description": "sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value. You can also have multiple occurrences of this option",
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
]
},
"openapi-normalizer": {
"description": "OpenAPI Normalizer transforms the input OpenAPI doc/spec (which may not perfectly conform to the specification) to make it workable with OpenAPI Generator.",
"type": "object",
"properties": {
"ADD_UNSIGNED_TO_INTEGER_WITH_INVALID_MAX_VALUE": {
"description": "when set to true, auto fix integer with maximum value 4294967295 (2^32-1) or long with 18446744073709551615 (2^64-1) by adding x-unsigned to the schema",
"type": "boolean"
},
"FILTER": {
"description": "When set to operationId:addPet|getPetById for example, it will add x-internal:true to operations with operationId not equal to addPet/getPetById (which will have x-internal set to false) so that these operations marked as internal won't be generated",
"type": "string"
},
"KEEP_ONLY_FIRST_TAG_IN_OPERATION": {
"description": "when set to true, only keep the first tag in operation if there are more than one tag defined",
"type": "boolean"
},
"REF_AS_PARENT_IN_ALLOF": {
"description": "when set to true, child schemas in allOf is considered a parent if it's a $ref (instead of inline schema)",
"type": "boolean"
},
"REFACTOR_ALLOF_WITH_PROPERTIES_ONLY": {
"description": "When set to true, refactor schema with allOf and properties in the same level to a schema with allOf only and, the allOf contains a new schema containing the properties in the top level",
"type": "boolean"
},
"REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY": {
"description": "when set to true, oneOf/anyOf schema with only required properies only in a schema with properties will be removed",
"type": "boolean"
},
"REMOVE_X_INTERNAL": {
"description": "Set to true if you want to disable the default behavior of removing/hiding the x-internal in operations and model",
"type": "boolean"
},
"SET_CONTAINER_TO_NULLABLE": {
"description": "When set to array|set|map (or just array) for example, it will set nullable in array, set and map to true",
"type": "string"
},
"SET_PRIMITIVE_TYPES_TO_NULLABLE": {
"description": "When set to string|integer|number|boolean (or just string) for example, it will set the type to nullable (nullable: true)",
"type": "string"
},
"SET_TAGS_FOR_ALL_OPERATIONS": {
"description": "when set to a string value, tags in all operations will reset to the string value provided",
"type": "boolean"
},
"SET_TAGS_TO_OPERATIONID": {
"description": "when set to true, tags in all operations will be set to operationId or \"default\" if operationId is empty",
"type": "boolean"
},
"SIMPLIFY_ANYOF_STRING_AND_ENUM_STRING": {
"description": "when set to true, simplify anyOf schema with string and enum of string to just string",
"type": "boolean"
},
"SIMPLIFY_BOOLEAN_ENUM": {
"description": "when set to true, convert boolean enum to just enum",
"type": "boolean"
},
"SIMPLIFY_ONEOF_ANYOF": {
"description": "when set to true, simplify oneOf/anyOf by 1) removing null (sub-schema) or enum of null (sub-schema) and setting nullable to true instead, and 2) simplifying oneOf/anyOf with a single sub-schema to just the sub-schema itself",
"type": "boolean"
}
}
},
"packageName": {
"type": "string",
"description": "package for generated classes (where supported)"
},
"releaseNote": {
"type": "string",
"description": "release note, default to 'Minor update'"
},
"removeOperationIdPrefix": {
"type": "boolean",
"description": "remove prefix of operationId, e.g. config_getId => getId"
},
"reservedWordsMappings": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
],
"description": "specifies how a reserved name should be escaped to. Otherwise, the default _<name> is used. For example id=identifier. You can also have multiple occurrences of this option"
},
"skipOverwrite": {
"type": "boolean",
"description": "specifies if the existing files should be overwritten during the generation"
},
"serverVariables": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
],
"description": "sets server variables overrides for spec documents which support variable templating of servers"
},
"skipValidateSpec": {
"type": "boolean",
"description": "skips the default behavior of validating an input specification"
},
"strictSpec": {
"type": "boolean",
"description": "'MUST' and 'SHALL' wording in OpenAPI spec is strictly adhered to. e.g. when false, no fixes will be applied to documents which pass validation but don't follow the spec"
},
"templateDir": {
"type": "string",
"description": "folder containing the template files"
},
"typeMappings": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
],
"description": "sets mappings between OpenAPI spec types and generated code types in the format of OpenAPIType=generatedType,OpenAPIType=generatedType. For example: array=List,map=Map,string=String. You can also have multiple occurrences of this option"
},
"verbose": {
"type": "boolean",
"description": "verbose mode"
}
}
}
}
}