diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-webclient/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-webclient/api.mustache index e4d9c005a63c..84191cfe1bda 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-webclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-spring-webclient/api.mustache @@ -72,7 +72,7 @@ import {{packageName}}.infrastructure.* {{/isDeprecated}} {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{>param_default_value}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): Mono<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> { return {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) - .map { {{#returnType}}it.body{{/returnType}}{{^returnType}}Unit{{/returnType}} } + .map { {{#returnType}}it.body!!{{/returnType}}{{^returnType}}Unit{{/returnType}} } } @Throws(WebClientResponseException::class) diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/AuthApi.kt b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/AuthApi.kt index 332f06549248..852c800048d3 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/AuthApi.kt +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/AuthApi.kt @@ -43,7 +43,7 @@ open class AuthApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testAuthHttpBasic(): Mono { return testAuthHttpBasicWithHttpInfo() - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -78,7 +78,7 @@ open class AuthApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testAuthHttpBearer(): Mono { return testAuthHttpBearerWithHttpInfo() - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/BodyApi.kt b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/BodyApi.kt index 48b26eeb45f4..4e1dbe75de3e 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/BodyApi.kt +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/BodyApi.kt @@ -45,7 +45,7 @@ open class BodyApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testBinaryGif(): Mono { return testBinaryGifWithHttpInfo() - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -80,7 +80,7 @@ open class BodyApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testBodyApplicationOctetstreamBinary(body: java.io.File? = null): Mono { return testBodyApplicationOctetstreamBinaryWithHttpInfo(body = body) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -116,7 +116,7 @@ open class BodyApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testBodyMultipartFormdataArrayOfBinary(files: kotlin.collections.List): Mono { return testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files = files) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -152,7 +152,7 @@ open class BodyApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testBodyMultipartFormdataSingleBinary(myFile: java.io.File? = null): Mono { return testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile = myFile) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -188,7 +188,7 @@ open class BodyApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testEchoBodyFreeFormObjectResponseString(body: kotlin.Any? = null): Mono { return testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body = body) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -224,7 +224,7 @@ open class BodyApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testEchoBodyPet(pet: Pet? = null): Mono { return testEchoBodyPetWithHttpInfo(pet = pet) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -260,7 +260,7 @@ open class BodyApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testEchoBodyPetResponseString(pet: Pet? = null): Mono { return testEchoBodyPetResponseStringWithHttpInfo(pet = pet) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -296,7 +296,7 @@ open class BodyApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testEchoBodyTagResponseString(tag: Tag? = null): Mono { return testEchoBodyTagResponseStringWithHttpInfo(tag = tag) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/FormApi.kt b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/FormApi.kt index bed8a675e994..e9dec9440a10 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/FormApi.kt +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/FormApi.kt @@ -43,7 +43,7 @@ open class FormApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testFormIntegerBooleanString(integerForm: kotlin.Int? = null, booleanForm: kotlin.Boolean? = null, stringForm: kotlin.String? = null): Mono { return testFormIntegerBooleanStringWithHttpInfo(integerForm = integerForm, booleanForm = booleanForm, stringForm = stringForm) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -81,7 +81,7 @@ open class FormApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testFormOneof(form1: kotlin.String? = null, form2: kotlin.Int? = null, form3: kotlin.String? = null, form4: kotlin.Boolean? = null, id: kotlin.Long? = null, name: kotlin.String? = null): Mono { return testFormOneofWithHttpInfo(form1 = form1, form2 = form2, form3 = form3, form4 = form4, id = id, name = name) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/HeaderApi.kt b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/HeaderApi.kt index 84348888eb5a..f5bef07b6a6d 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/HeaderApi.kt +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/HeaderApi.kt @@ -53,7 +53,7 @@ open class HeaderApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testHeaderIntegerBooleanStringEnums(integerHeader: kotlin.Int? = null, booleanHeader: kotlin.Boolean? = null, stringHeader: kotlin.String? = null, enumNonrefStringHeader: EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums? = null, enumRefStringHeader: StringEnumRef? = null): Mono { return testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader = integerHeader, booleanHeader = booleanHeader, stringHeader = stringHeader, enumNonrefStringHeader = enumNonrefStringHeader, enumRefStringHeader = enumRefStringHeader) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/PathApi.kt b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/PathApi.kt index ad7dd877ae32..467489f45a62 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/PathApi.kt +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/PathApi.kt @@ -53,7 +53,7 @@ open class PathApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: kotlin.String, pathInteger: kotlin.Int, enumNonrefStringPath: EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, enumRefStringPath: StringEnumRef): Mono { return testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString = pathString, pathInteger = pathInteger, enumNonrefStringPath = enumNonrefStringPath, enumRefStringPath = enumRefStringPath) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/QueryApi.kt b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/QueryApi.kt index e4af8b23528f..c2b3333e3f7e 100644 --- a/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/QueryApi.kt +++ b/samples/client/echo_api/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/QueryApi.kt @@ -55,7 +55,7 @@ open class QueryApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testEnumRefString(enumNonrefStringQuery: EnumNonrefStringQueryTestEnumRefString? = null, enumRefStringQuery: StringEnumRef? = null): Mono { return testEnumRefStringWithHttpInfo(enumNonrefStringQuery = enumNonrefStringQuery, enumRefStringQuery = enumRefStringQuery) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -98,7 +98,7 @@ open class QueryApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testQueryDatetimeDateString(datetimeQuery: java.time.OffsetDateTime? = null, dateQuery: java.time.LocalDate? = null, stringQuery: kotlin.String? = null): Mono { return testQueryDatetimeDateStringWithHttpInfo(datetimeQuery = datetimeQuery, dateQuery = dateQuery, stringQuery = stringQuery) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -144,7 +144,7 @@ open class QueryApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testQueryIntegerBooleanString(integerQuery: kotlin.Int? = null, booleanQuery: kotlin.Boolean? = null, stringQuery: kotlin.String? = null): Mono { return testQueryIntegerBooleanStringWithHttpInfo(integerQuery = integerQuery, booleanQuery = booleanQuery, stringQuery = stringQuery) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -190,7 +190,7 @@ open class QueryApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testQueryStyleDeepObjectExplodeTrueObject(queryObject: Pet? = null): Mono { return testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject = queryObject) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -230,7 +230,7 @@ open class QueryApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testQueryStyleFormExplodeTrueArrayString(queryObject: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? = null): Mono { return testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject = queryObject) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -270,7 +270,7 @@ open class QueryApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun testQueryStyleFormExplodeTrueObject(queryObject: Pet? = null): Mono { return testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject = queryObject) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 29149b7d621e..f5c95fb92f94 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,7 +45,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun addPet(pet: Pet): Mono { return addPetWithHttpInfo(pet = pet) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -127,7 +127,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun findPetsByStatus(status: kotlin.collections.List): Mono> { return findPetsByStatusWithHttpInfo(status = status) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -166,7 +166,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List): Mono> { return findPetsByTagsWithHttpInfo(tags = tags) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -206,7 +206,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun getPetById(petId: kotlin.Long): Mono { return getPetByIdWithHttpInfo(petId = petId) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -242,7 +242,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun updatePet(pet: Pet): Mono { return updatePetWithHttpInfo(pet = pet) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -316,7 +316,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): Mono { return uploadFileWithHttpInfo(petId = petId, additionalMetadata = additionalMetadata, file = file) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 90063a10c1b4..4559304452ab 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -79,7 +79,7 @@ open class StoreApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun getInventory(): Mono> { return getInventoryWithHttpInfo() - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -114,7 +114,7 @@ open class StoreApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun getOrderById(orderId: kotlin.Long): Mono { return getOrderByIdWithHttpInfo(orderId = orderId) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -150,7 +150,7 @@ open class StoreApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun placeOrder(order: Order): Mono { return placeOrderWithHttpInfo(order = order) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 9a7bdac04626..0593134e68d3 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -184,7 +184,7 @@ open class UserApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun getUserByName(username: kotlin.String): Mono { return getUserByNameWithHttpInfo(username = username) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -220,7 +220,7 @@ open class UserApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun loginUser(username: kotlin.String, password: kotlin.String): Mono { return loginUserWithHttpInfo(username = username, password = password) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 29149b7d621e..f5c95fb92f94 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,7 +45,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun addPet(pet: Pet): Mono { return addPetWithHttpInfo(pet = pet) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -127,7 +127,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun findPetsByStatus(status: kotlin.collections.List): Mono> { return findPetsByStatusWithHttpInfo(status = status) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -166,7 +166,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List): Mono> { return findPetsByTagsWithHttpInfo(tags = tags) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -206,7 +206,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun getPetById(petId: kotlin.Long): Mono { return getPetByIdWithHttpInfo(petId = petId) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -242,7 +242,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun updatePet(pet: Pet): Mono { return updatePetWithHttpInfo(pet = pet) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -316,7 +316,7 @@ open class PetApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): Mono { return uploadFileWithHttpInfo(petId = petId, additionalMetadata = additionalMetadata, file = file) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 90063a10c1b4..4559304452ab 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -79,7 +79,7 @@ open class StoreApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun getInventory(): Mono> { return getInventoryWithHttpInfo() - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -114,7 +114,7 @@ open class StoreApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun getOrderById(orderId: kotlin.Long): Mono { return getOrderByIdWithHttpInfo(orderId = orderId) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -150,7 +150,7 @@ open class StoreApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun placeOrder(order: Order): Mono { return placeOrderWithHttpInfo(order = order) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 9a7bdac04626..0593134e68d3 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -184,7 +184,7 @@ open class UserApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun getUserByName(username: kotlin.String): Mono { return getUserByNameWithHttpInfo(username = username) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class) @@ -220,7 +220,7 @@ open class UserApi(client: WebClient) : ApiClient(client) { @Throws(WebClientResponseException::class) fun loginUser(username: kotlin.String, password: kotlin.String): Mono { return loginUserWithHttpInfo(username = username, password = password) - .map { it.body } + .map { it.body!! } } @Throws(WebClientResponseException::class)