You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt
+43-3Lines changed: 43 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
* you may not use this file except in compliance with the License.
6
6
* You may obtain a copy of the License at
7
7
*
8
-
* https://www.apache.org/licenses/LICENSE-2.0
8
+
* https://www.apache.org/licenses/LICENSE-2.0
9
9
*
10
10
* Unless required by applicable law or agreed to in writing, software
11
11
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -294,36 +293,71 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
294
293
295
294
/**
296
295
* Defines which API-related files should be generated. This allows you to create a subset of generated files (or none at all).
296
+
*
297
+
* NOTE: Configuring any one of [apiFilesConstrainedTo], [modelFilesConstrainedTo], or [supportingFilesConstrainedTo] results
298
+
* in others being disabled. That is, OpenAPI Generator considers any one of these to define a subset of generation.
299
+
* For more control over generation of individual files, configure an ignore file and refer to it via [ignoreFileOverride].
297
300
*/
298
301
val apiFilesConstrainedTo = project.objects.listProperty<String>()
299
302
300
303
/**
301
304
* Defines which model-related files should be generated. This allows you to create a subset of generated files (or none at all).
305
+
*
306
+
* NOTE: Configuring any one of [apiFilesConstrainedTo], [modelFilesConstrainedTo], or [supportingFilesConstrainedTo] results
307
+
* in others being disabled. That is, OpenAPI Generator considers any one of these to define a subset of generation.
308
+
* For more control over generation of individual files, configure an ignore file and refer to it via [ignoreFileOverride].
302
309
*/
303
310
val modelFilesConstrainedTo = project.objects.listProperty<String>()
304
311
305
312
/**
306
313
* Defines which supporting files should be generated. This allows you to create a subset of generated files (or none at all).
314
+
*
315
+
* Supporting files are those related to `projects/frameworks` which may be modified
316
+
* by consumers.
317
+
*
318
+
* NOTE: Configuring any one of [apiFilesConstrainedTo], [modelFilesConstrainedTo], or [supportingFilesConstrainedTo] results
319
+
* in others being disabled. That is, OpenAPI Generator considers any one of these to define a subset of generation.
320
+
* For more control over generation of individual files, configure an ignore file and refer to it via [ignoreFileOverride].
307
321
*/
308
322
val supportingFilesConstrainedTo = project.objects.listProperty<String>()
309
323
310
324
/**
311
325
* Defines whether model-related _test_ files should be generated.
326
+
*
327
+
* This option enables/disables generation of ALL model-related _test_ files.
328
+
*
329
+
* For more control over generation of individual files, configure an ignore file and
330
+
* refer to it via [ignoreFileOverride].
312
331
*/
313
332
val generateModelTests = project.objects.property<Boolean>()
314
333
315
334
/**
316
335
* Defines whether model-related _documentation_ files should be generated.
336
+
*
337
+
* This option enables/disables generation of ALL model-related _documentation_ files.
338
+
*
339
+
* For more control over generation of individual files, configure an ignore file and
340
+
* refer to it via [ignoreFileOverride].
317
341
*/
318
342
val generateModelDocumentation = project.objects.property<Boolean>()
319
343
320
344
/**
321
345
* Defines whether api-related _test_ files should be generated.
346
+
*
347
+
* This option enables/disables generation of ALL api-related _test_ files.
348
+
*
349
+
* For more control over generation of individual files, configure an ignore file and
350
+
* refer to it via [ignoreFileOverride].
322
351
*/
323
352
val generateApiTests = project.objects.property<Boolean>()
324
353
325
354
/**
326
355
* Defines whether api-related _documentation_ files should be generated.
356
+
*
357
+
* This option enables/disables generation of ALL api-related _documentation_ files.
358
+
*
359
+
* For more control over generation of individual files, configure an ignore file and
360
+
* refer to it via [ignoreFileOverride].
327
361
*/
328
362
val generateApiDocumentation = project.objects.property<Boolean>()
329
363
@@ -334,6 +368,9 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
334
368
335
369
/**
336
370
* To enable the file post-processing hook. This enables executing an external post-processor (usually a linter program).
371
+
* This only enables the post-processor. To define the post-processing command, define an environment variable such as
372
+
* LANG_POST_PROCESS_FILE (e.g. GO_POST_PROCESS_FILE, SCALA_POST_PROCESS_FILE). Please open an issue if your target
373
+
* generator does not support this functionality.
337
374
*/
338
375
val enablePostProcessFile = project.objects.property<Boolean>()
339
376
@@ -343,7 +380,9 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
343
380
val skipValidateSpec = project.objects.property<Boolean>()
344
381
345
382
/**
346
-
* To generate alias (array, list, map) as model.
383
+
* To generate alias (array, list, map) as model. When false, top-level objects defined as array, list, or map will result in those
384
+
* definitions generated as top-level Array-of-items, List-of-items, Map-of-items definitions.
385
+
* When true, A model representation either containing or extending the array,list,map (depending on specific generator implementation) will be generated.
347
386
*/
348
387
val generateAliasAsModel = project.objects.property<Boolean>()
349
388
@@ -359,6 +398,7 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
359
398
360
399
/**
361
400
* Defines whether the output dir should be cleaned up before generating the output.
401
+
*
362
402
*/
363
403
val cleanupOutput = project.objects.property<Boolean>()
Copy file name to clipboardExpand all lines: modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
* you may not use this file except in compliance with the License.
6
6
* You may obtain a copy of the License at
7
7
*
8
-
* https://www.apache.org/licenses/LICENSE-2.0
8
+
* https://www.apache.org/licenses/LICENSE-2.0
9
9
*
10
10
* Unless required by applicable law or agreed to in writing, software
11
11
* distributed under the License is distributed on an "AS IS" BASIS,
0 commit comments