Stefan Koppier 227c8602f7
[kotlin-client][jvm-spring-*] Fix runtime error in endpoints of type Unit (#17664)
* Fixed invalid extraction of response body in kotlin-client jvm-spring-*

* Generated echo-api for kotlin-jvm-spring-3-restclient

* Specific echo-api for Kotlin without allOf/anyOf

* Specific echo-api for Kotlin without allOf/anyOf

* Generated all samples

* Added kotlin-jvm-spring-3-restclient sample to workflow

* Fixed syntax problem
2024-01-22 10:57:40 +08:00

2.2 KiB

HeaderApi

All URIs are relative to http://localhost:3000

Method HTTP request Description
testHeaderIntegerBooleanStringEnums GET /header/integer/boolean/string/enums Test header parameter(s)

testHeaderIntegerBooleanStringEnums

kotlin.String testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader)

Test header parameter(s)

Test header parameter(s)

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = HeaderApi()
val integerHeader : kotlin.Int = 56 // kotlin.Int | 
val booleanHeader : kotlin.Boolean = true // kotlin.Boolean | 
val stringHeader : kotlin.String = stringHeader_example // kotlin.String | 
val enumNonrefStringHeader : kotlin.String = enumNonrefStringHeader_example // kotlin.String | 
val enumRefStringHeader : StringEnumRef =  // StringEnumRef | 
try {
    val result : kotlin.String = apiInstance.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling HeaderApi#testHeaderIntegerBooleanStringEnums")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling HeaderApi#testHeaderIntegerBooleanStringEnums")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
integerHeader kotlin.Int [optional]
booleanHeader kotlin.Boolean [optional]
stringHeader kotlin.String [optional]
enumNonrefStringHeader kotlin.String [optional] [enum: success, failure, unclassified]
enumRefStringHeader StringEnumRef [optional] [enum: success, failure, unclassified]

Return type

kotlin.String

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain