Skip to content

Commit f0e1e4b

Browse files
zihotkiwing328
authored andcommitted
Update gradle plugin's Readme.md (OpenAPITools#1356)
Add a note about use of `systemProperties` since some options are confusing and hard to guess how to use correctly. The only source I was able to find how to configure it in the way I need was a comment to issue OpenAPITools#551 (comment)
1 parent 3de731d commit f0e1e4b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

modules/openapi-generator-gradle-plugin/README.adoc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,32 @@ in others being disabled. That is, OpenAPI Generator considers any one of these
278278
For more control over generation of individual files, configure an ignore file and refer to it via `ignoreFileOverride`.
279279
====
280280

281+
[NOTE]
282+
====
283+
When configuring `systemProperties` in order to perform selective generation you can disable generation of some parts by providing `"false"` value:
284+
[source,groovy]
285+
----
286+
openApiGenerate {
287+
// other settings omitted
288+
systemProperties = [
289+
modelDocs: "false",
290+
apis: "false"
291+
]
292+
}
293+
----
294+
When enabling generation of only specific parts you either have to provide CSV list of what you particularly are generating or provide an empty string `""` to generate everything. If you provide `"true"` it will be treated as a specific name of model or api you want to generate.
295+
[source,groovy]
296+
----
297+
openApiGenerate {
298+
// other settings omitted
299+
systemProperties = [
300+
apis: "",
301+
models: "User,Pet"
302+
]
303+
}
304+
----
305+
====
306+
281307
=== openApiValidate
282308

283309
.Options

0 commit comments

Comments
 (0)