From ac6fd3f79f676133bf7cc932ffe4470e1bccc603 Mon Sep 17 00:00:00 2001 From: Vasili Puchko <114631+zihotki@users.noreply.github.com> Date: Sat, 3 Nov 2018 14:58:43 +0100 Subject: [PATCH] Update gradle plugin's Readme.md (#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 https://github.com/OpenAPITools/openapi-generator/issues/551#issuecomment-411686091 --- .../README.adoc | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index a1ab1e18fc2..2ad4d3300a6 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -278,6 +278,32 @@ in others being disabled. That is, OpenAPI Generator considers any one of these For more control over generation of individual files, configure an ignore file and refer to it via `ignoreFileOverride`. ==== +[NOTE] +==== +When configuring `systemProperties` in order to perform selective generation you can disable generation of some parts by providing `"false"` value: +[source,groovy] +---- +openApiGenerate { + // other settings omitted + systemProperties = [ + modelDocs: "false", + apis: "false" + ] +} +---- +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. +[source,groovy] +---- +openApiGenerate { + // other settings omitted + systemProperties = [ + apis: "", + models: "User,Pet" + ] +} +---- +==== + === openApiValidate .Options