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: docs/generators/kotlin.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
30
30
|generateOneOfAnyOfWrappers|Generate oneOf, anyOf schemas as wrappers. Only `jvm-retrofit2`(library), `gson`(serializationLibrary) support this option.||false|
31
31
|generateRoomModels|Generate Android Room database models in addition to API models (JVM Volley library only)||false|
|mapFileBinaryToByteArray|Map File and Binary to ByteArray (default: false)||false|
36
36
|modelMutable|Create mutable models||false|
@@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
50
50
|supportAndroidApiLevel25AndBelow|[WARNING] This flag will generate code that has a known security vulnerability. It uses `kotlin.io.createTempFile` instead of `java.nio.file.Files.createTempFile` in order to support Android API level 25 and below. For more info, please check the following links https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf, https://github.com/OpenAPITools/openapi-generator/pull/9284||false|
51
51
|useCoroutines|Whether to use the Coroutines adapter with the retrofit2 library.||false|
52
52
|useNonAsciiHeaders|Allow to use non-ascii headers with the okhttp library||false|
53
+
|useResponseAsReturnType|When using retrofit2 and coroutines, use `Response`<`T`> as return type instead of `T`.||true|
53
54
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library.||false|
54
55
|useSettingsGradle|Whether the project uses settings.gradle.||false|
55
56
|useSpringBoot3|Whether to use the Spring Boot 3 with the jvm-spring-webclient library.||false|
@@ -265,7 +266,7 @@ public KotlinClientCodegen() {
265
266
cliOptions.add(CliOption.newBoolean(OMIT_GRADLE_PLUGIN_VERSIONS, "Whether to declare Gradle plugin versions in build files."));
266
267
cliOptions.add(CliOption.newBoolean(OMIT_GRADLE_WRAPPER, "Whether to omit Gradle wrapper for creating a sub project."));
267
268
cliOptions.add(CliOption.newBoolean(USE_SETTINGS_GRADLE, "Whether the project uses settings.gradle."));
268
-
cliOptions.add(CliOption.newBoolean(IDEA, "Add IntellJ Idea plugin and mark Kotlin main and test folders as source folders."));
269
+
cliOptions.add(CliOption.newBoolean(IDEA, "Add IntelliJ Idea plugin and mark Kotlin main and test folders as source folders."));
269
270
270
271
cliOptions.add(CliOption.newBoolean(MOSHI_CODE_GEN, "Whether to enable codegen with the Moshi library. Refer to the [official Moshi doc](https://github.com/square/moshi#codegen) for more info."));
271
272
cliOptions.add(CliOption.newBoolean(FAIL_ON_UNKNOWN_PROPERTIES, "Fail Jackson de-serialization on unknown properties", false));
@@ -286,6 +287,7 @@ public KotlinClientCodegen() {
cliOptions.add(CliOption.newBoolean(USE_NON_ASCII_HEADERS, "Allow to use non-ascii headers with the okhttp library"));
290
+
cliOptions.add(CliOption.newBoolean(USE_RESPONSE_AS_RETURN_TYPE, "When using retrofit2 and coroutines, use `Response`<`T`> as return type instead of `T`.", true));
0 commit comments