Skip to content

Commit de3cbde

Browse files
committed
add comments back
1 parent 631c26e commit de3cbde

2 files changed

Lines changed: 44 additions & 4 deletions

File tree

modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -29,7 +29,6 @@ import org.gradle.kotlin.dsl.property
2929
* @author Jim Schubert
3030
*/
3131
open class OpenApiGeneratorGenerateExtension(private val project: Project) {
32-
3332
/**
3433
* The verbosity of generation
3534
*/
@@ -294,36 +293,71 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
294293

295294
/**
296295
* 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].
297300
*/
298301
val apiFilesConstrainedTo = project.objects.listProperty<String>()
299302

300303
/**
301304
* 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].
302309
*/
303310
val modelFilesConstrainedTo = project.objects.listProperty<String>()
304311

305312
/**
306313
* 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].
307321
*/
308322
val supportingFilesConstrainedTo = project.objects.listProperty<String>()
309323

310324
/**
311325
* 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].
312331
*/
313332
val generateModelTests = project.objects.property<Boolean>()
314333

315334
/**
316335
* 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].
317341
*/
318342
val generateModelDocumentation = project.objects.property<Boolean>()
319343

320344
/**
321345
* 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].
322351
*/
323352
val generateApiTests = project.objects.property<Boolean>()
324353

325354
/**
326355
* 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].
327361
*/
328362
val generateApiDocumentation = project.objects.property<Boolean>()
329363

@@ -334,6 +368,9 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
334368

335369
/**
336370
* 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.
337374
*/
338375
val enablePostProcessFile = project.objects.property<Boolean>()
339376

@@ -343,7 +380,9 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
343380
val skipValidateSpec = project.objects.property<Boolean>()
344381

345382
/**
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.
347386
*/
348387
val generateAliasAsModel = project.objects.property<Boolean>()
349388

@@ -359,6 +398,7 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
359398

360399
/**
361400
* Defines whether the output dir should be cleaned up before generating the output.
401+
*
362402
*/
363403
val cleanupOutput = project.objects.property<Boolean>()
364404

modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

0 commit comments

Comments
 (0)