@@ -62,11 +62,8 @@ block name.
6262
6363 spring {
6464 apiPath = "$projectDir/src/api/openapi.yaml"
65- typeMappings = "$projectDir/openapi-mapping.yaml"
66-
6765 targetDir = "$projectDir/build/openapi"
68- packageName = "com.github.hauner.openapi.sample"
69-
66+ mapping = "$projectDir/openapi-mapping.yaml"
7067 showWarnings = true
7168 }
7269
@@ -75,28 +72,42 @@ block name.
7572- ` apiPath ` : (** required** ) the path to the ` openapi.yaml ` file and the main input for the generatr. If
7673set in the top level block it will be used for all configured generatrs.
7774
78- - ` typeMappings ` : (** optional** ) defines the type mapping if required. This is either a path to yaml
79- file or a yaml string (i.e. the content of the yaml file). See [ java type mapping] [ docs-mapping ] for a
80- description of the mapping yaml.
81-
8275- ` targetDir ` : (** required** ) the output folder for generating interfaces & models. This is the parent
8376 of the ` packageName ` folder tree. It is recommended to set this to a subfolder of gradle's standard ` build `
8477directory so it is cleared by the ` clean ` task and does not pollute the sources directory.
8578
8679 See [ running the generatr] [ docs-running ] how to include the ` targetDir ` in compilation & packing.
8780
81+ - ` mapping ` : (** required** , since 1.0.0.M6) provides the generatr mapping options. This is a path
82+ to yaml file. See [ Configuration] [ docs-configuration ] for a description of the mapping yaml. This replaces
83+ the ` typeMappings ` option.
84+
85+ - ` showWarnings ` : (** optional** ) ` true ` to show warnings from the open api parser or ` false ` (default) to
86+ show no warnings.
87+
88+
89+ ** Deprecated** the following options are deprecated starting with '1.0.0.M6'
90+ See [ Configuration] [ docs-configuration ] .
91+ {: .note .deprecated .mb-6}
92+
93+ - ` typeMappings ` : (** optional** ) defines the type mapping if required. This is either a path to yaml
94+ file or a yaml string (i.e. the content of the yaml file). See [ java type mapping] [ docs-mapping ] for a
95+ description of the mapping yaml.
96+
97+ starting with '1.0.0.M6' this is replaced by the ` mapping ` option.
98+
8899- ` packageName ` : (** required** ) the root package name of the generated interfaces & models. The package folder
89100 tree will be created inside ` targetDir ` .
90101
91102 Interfaces and models will be generated into the ` api ` and ` model ` subpackages of ` packageName ` .
92103
93104 - so the final package name of the generated interfaces will be ` "${packageName}.api" `
94105 - and the final package name of the generated models will be ` "${packageName}.model" `
95- {: .mb-5 }
96-
97- - ` showWarnings ` : (** optional** ) ` true ` to show warnings from the open api parser or ` false ` (default) to
98- show no warnings.
106+ {: .mb-5 }
99107
108+ starting with '1.0.0.M6' it is recommended to provide this in the mapping yaml. See
109+ [ Configuration] [ docs-configuration ] .
110+ {: .mb-5 }
100111
101112# running generatr-spring
102113
@@ -128,4 +139,5 @@ Adding automatic compilation in this way will also automatically include the gen
128139
129140[ generatr-gradle ] : https://github.com/hauner/openapi-generatr-gradle
130141[ docs-mapping ] : /openapi-generatr-spring/mapping/
142+ [ docs-configuration ] : /openapi-generatr-spring/generatr/configuration.html
131143[ docs-running ] : #running-generatr-spring
0 commit comments