mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
[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
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
import org.springframework.web.client.RestClient
|
||||
import org.springframework.web.client.RestClientResponseException
|
||||
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.http.MediaType
|
||||
|
||||
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class AuthApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
constructor(baseUrl: String) : this(RestClient.builder()
|
||||
.baseUrl(baseUrl)
|
||||
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||
.build()
|
||||
)
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testAuthHttpBasic(): kotlin.String {
|
||||
val result = testAuthHttpBasicWithHttpInfo()
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testAuthHttpBasicWithHttpInfo(): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testAuthHttpBasicRequestConfig()
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testAuthHttpBasicRequestConfig() : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/auth/http/basic",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = true,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testAuthHttpBearer(): kotlin.String {
|
||||
val result = testAuthHttpBearerWithHttpInfo()
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testAuthHttpBearerWithHttpInfo(): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testAuthHttpBearerRequestConfig()
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testAuthHttpBearerRequestConfig() : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/auth/http/bearer",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = true,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
import org.springframework.web.client.RestClient
|
||||
import org.springframework.web.client.RestClientResponseException
|
||||
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.http.MediaType
|
||||
|
||||
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class BodyApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
constructor(baseUrl: String) : this(RestClient.builder()
|
||||
.baseUrl(baseUrl)
|
||||
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||
.build()
|
||||
)
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testBinaryGif(): java.io.File {
|
||||
val result = testBinaryGifWithHttpInfo()
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testBinaryGifWithHttpInfo(): ResponseEntity<java.io.File> {
|
||||
val localVariableConfig = testBinaryGifRequestConfig()
|
||||
return request<Unit, java.io.File>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testBinaryGifRequestConfig() : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "image/gif"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/binary/gif",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testBodyApplicationOctetstreamBinary(body: java.io.File? = null): kotlin.String {
|
||||
val result = testBodyApplicationOctetstreamBinaryWithHttpInfo(body = body)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testBodyApplicationOctetstreamBinaryWithHttpInfo(body: java.io.File? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testBodyApplicationOctetstreamBinaryRequestConfig(body = body)
|
||||
return request<java.io.File, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testBodyApplicationOctetstreamBinaryRequestConfig(body: java.io.File? = null) : RequestConfig<java.io.File> {
|
||||
val localVariableBody = body
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Content-Type"] = "application/octet-stream"
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/body/application/octetstream/binary",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testBodyMultipartFormdataArrayOfBinary(files: kotlin.collections.List<java.io.File>): kotlin.String {
|
||||
val result = testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files = files)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files: kotlin.collections.List<java.io.File>): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testBodyMultipartFormdataArrayOfBinaryRequestConfig(files = files)
|
||||
return request<Map<String, PartConfig<*>>, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testBodyMultipartFormdataArrayOfBinaryRequestConfig(files: kotlin.collections.List<java.io.File>) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"files" to PartConfig(body = files, headers = mutableMapOf()),)
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "multipart/form-data")
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/body/application/octetstream/array_of_binary",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testBodyMultipartFormdataSingleBinary(myFile: java.io.File? = null): kotlin.String {
|
||||
val result = testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile = myFile)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile: java.io.File? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testBodyMultipartFormdataSingleBinaryRequestConfig(myFile = myFile)
|
||||
return request<Map<String, PartConfig<*>>, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testBodyMultipartFormdataSingleBinaryRequestConfig(myFile: java.io.File? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"my-file" to PartConfig(body = myFile, headers = mutableMapOf()),)
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "multipart/form-data")
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/body/application/octetstream/single_binary",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEchoBodyFreeFormObjectResponseString(body: kotlin.Any? = null): kotlin.String {
|
||||
val result = testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body = body)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body: kotlin.Any? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testEchoBodyFreeFormObjectResponseStringRequestConfig(body = body)
|
||||
return request<kotlin.Any, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testEchoBodyFreeFormObjectResponseStringRequestConfig(body: kotlin.Any? = null) : RequestConfig<kotlin.Any> {
|
||||
val localVariableBody = body
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Content-Type"] = "application/json"
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/echo/body/FreeFormObject/response_string",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEchoBodyPet(pet: Pet? = null): Pet {
|
||||
val result = testEchoBodyPetWithHttpInfo(pet = pet)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEchoBodyPetWithHttpInfo(pet: Pet? = null): ResponseEntity<Pet> {
|
||||
val localVariableConfig = testEchoBodyPetRequestConfig(pet = pet)
|
||||
return request<Pet, Pet>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testEchoBodyPetRequestConfig(pet: Pet? = null) : RequestConfig<Pet> {
|
||||
val localVariableBody = pet
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Content-Type"] = "application/json"
|
||||
localVariableHeaders["Accept"] = "application/json"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/echo/body/Pet",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEchoBodyPetResponseString(pet: Pet? = null): kotlin.String {
|
||||
val result = testEchoBodyPetResponseStringWithHttpInfo(pet = pet)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEchoBodyPetResponseStringWithHttpInfo(pet: Pet? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testEchoBodyPetResponseStringRequestConfig(pet = pet)
|
||||
return request<Pet, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testEchoBodyPetResponseStringRequestConfig(pet: Pet? = null) : RequestConfig<Pet> {
|
||||
val localVariableBody = pet
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Content-Type"] = "application/json"
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/echo/body/Pet/response_string",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEchoBodyTagResponseString(tag: Tag? = null): kotlin.String {
|
||||
val result = testEchoBodyTagResponseStringWithHttpInfo(tag = tag)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEchoBodyTagResponseStringWithHttpInfo(tag: Tag? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testEchoBodyTagResponseStringRequestConfig(tag = tag)
|
||||
return request<Tag, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testEchoBodyTagResponseStringRequestConfig(tag: Tag? = null) : RequestConfig<Tag> {
|
||||
val localVariableBody = tag
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Content-Type"] = "application/json"
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/echo/body/Tag/response_string",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
import org.springframework.web.client.RestClient
|
||||
import org.springframework.web.client.RestClientResponseException
|
||||
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.http.MediaType
|
||||
|
||||
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class FormApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
constructor(baseUrl: String) : this(RestClient.builder()
|
||||
.baseUrl(baseUrl)
|
||||
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||
.build()
|
||||
)
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testFormIntegerBooleanString(integerForm: kotlin.Int? = null, booleanForm: kotlin.Boolean? = null, stringForm: kotlin.String? = null): kotlin.String {
|
||||
val result = testFormIntegerBooleanStringWithHttpInfo(integerForm = integerForm, booleanForm = booleanForm, stringForm = stringForm)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testFormIntegerBooleanStringWithHttpInfo(integerForm: kotlin.Int? = null, booleanForm: kotlin.Boolean? = null, stringForm: kotlin.String? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testFormIntegerBooleanStringRequestConfig(integerForm = integerForm, booleanForm = booleanForm, stringForm = stringForm)
|
||||
return request<Map<String, PartConfig<*>>, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testFormIntegerBooleanStringRequestConfig(integerForm: kotlin.Int? = null, booleanForm: kotlin.Boolean? = null, stringForm: kotlin.String? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"integer_form" to PartConfig(body = integerForm, headers = mutableMapOf()),
|
||||
"boolean_form" to PartConfig(body = booleanForm, headers = mutableMapOf()),
|
||||
"string_form" to PartConfig(body = stringForm, headers = mutableMapOf()),)
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded")
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/form/integer/boolean/string",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::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): kotlin.String {
|
||||
val result = testFormOneofWithHttpInfo(form1 = form1, form2 = form2, form3 = form3, form4 = form4, id = id, name = name)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testFormOneofWithHttpInfo(form1: kotlin.String? = null, form2: kotlin.Int? = null, form3: kotlin.String? = null, form4: kotlin.Boolean? = null, id: kotlin.Long? = null, name: kotlin.String? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testFormOneofRequestConfig(form1 = form1, form2 = form2, form3 = form3, form4 = form4, id = id, name = name)
|
||||
return request<Map<String, PartConfig<*>>, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testFormOneofRequestConfig(form1: kotlin.String? = null, form2: kotlin.Int? = null, form3: kotlin.String? = null, form4: kotlin.Boolean? = null, id: kotlin.Long? = null, name: kotlin.String? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||
val localVariableBody = mapOf(
|
||||
"form1" to PartConfig(body = form1, headers = mutableMapOf()),
|
||||
"form2" to PartConfig(body = form2, headers = mutableMapOf()),
|
||||
"form3" to PartConfig(body = form3, headers = mutableMapOf()),
|
||||
"form4" to PartConfig(body = form4, headers = mutableMapOf()),
|
||||
"id" to PartConfig(body = id, headers = mutableMapOf()),
|
||||
"name" to PartConfig(body = name, headers = mutableMapOf()),)
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded")
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.POST,
|
||||
path = "/form/oneof",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
import org.springframework.web.client.RestClient
|
||||
import org.springframework.web.client.RestClientResponseException
|
||||
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.http.MediaType
|
||||
|
||||
|
||||
import org.openapitools.client.models.StringEnumRef
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class HeaderApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
constructor(baseUrl: String) : this(RestClient.builder()
|
||||
.baseUrl(baseUrl)
|
||||
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||
.build()
|
||||
)
|
||||
|
||||
/**
|
||||
* enum for parameter enumNonrefStringHeader
|
||||
*/
|
||||
enum class EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums(val value: kotlin.String) {
|
||||
@JsonProperty(value = "success") success("success"),
|
||||
@JsonProperty(value = "failure") failure("failure"),
|
||||
@JsonProperty(value = "unclassified") unclassified("unclassified"),
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testHeaderIntegerBooleanStringEnums(integerHeader: kotlin.Int? = null, booleanHeader: kotlin.Boolean? = null, stringHeader: kotlin.String? = null, enumNonrefStringHeader: EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums? = null, enumRefStringHeader: StringEnumRef? = null): kotlin.String {
|
||||
val result = testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader = integerHeader, booleanHeader = booleanHeader, stringHeader = stringHeader, enumNonrefStringHeader = enumNonrefStringHeader, enumRefStringHeader = enumRefStringHeader)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader: kotlin.Int? = null, booleanHeader: kotlin.Boolean? = null, stringHeader: kotlin.String? = null, enumNonrefStringHeader: EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums? = null, enumRefStringHeader: StringEnumRef? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testHeaderIntegerBooleanStringEnumsRequestConfig(integerHeader = integerHeader, booleanHeader = booleanHeader, stringHeader = stringHeader, enumNonrefStringHeader = enumNonrefStringHeader, enumRefStringHeader = enumRefStringHeader)
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testHeaderIntegerBooleanStringEnumsRequestConfig(integerHeader: kotlin.Int? = null, booleanHeader: kotlin.Boolean? = null, stringHeader: kotlin.String? = null, enumNonrefStringHeader: EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums? = null, enumRefStringHeader: StringEnumRef? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
integerHeader?.apply { localVariableHeaders["integer_header"] = this.toString() }
|
||||
booleanHeader?.apply { localVariableHeaders["boolean_header"] = this.toString() }
|
||||
stringHeader?.apply { localVariableHeaders["string_header"] = this.toString() }
|
||||
enumNonrefStringHeader?.apply { localVariableHeaders["enum_nonref_string_header"] = this.toString() }
|
||||
enumRefStringHeader?.apply { localVariableHeaders["enum_ref_string_header"] = this.toString() }
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.GET,
|
||||
path = "/header/integer/boolean/string/enums",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
import org.springframework.web.client.RestClient
|
||||
import org.springframework.web.client.RestClientResponseException
|
||||
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.http.MediaType
|
||||
|
||||
|
||||
import org.openapitools.client.models.StringEnumRef
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class PathApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
constructor(baseUrl: String) : this(RestClient.builder()
|
||||
.baseUrl(baseUrl)
|
||||
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||
.build()
|
||||
)
|
||||
|
||||
/**
|
||||
* enum for parameter enumNonrefStringPath
|
||||
*/
|
||||
enum class EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(val value: kotlin.String) {
|
||||
@JsonProperty(value = "success") success("success"),
|
||||
@JsonProperty(value = "failure") failure("failure"),
|
||||
@JsonProperty(value = "unclassified") unclassified("unclassified"),
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: kotlin.String, pathInteger: kotlin.Int, enumNonrefStringPath: EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, enumRefStringPath: StringEnumRef): kotlin.String {
|
||||
val result = testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString = pathString, pathInteger = pathInteger, enumNonrefStringPath = enumNonrefStringPath, enumRefStringPath = enumRefStringPath)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString: kotlin.String, pathInteger: kotlin.Int, enumNonrefStringPath: EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, enumRefStringPath: StringEnumRef): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequestConfig(pathString = pathString, pathInteger = pathInteger, enumNonrefStringPath = enumNonrefStringPath, enumRefStringPath = enumRefStringPath)
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequestConfig(pathString: kotlin.String, pathInteger: kotlin.Int, enumNonrefStringPath: EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, enumRefStringPath: StringEnumRef) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
"path_string" to pathString,
|
||||
"path_integer" to pathInteger,
|
||||
"enum_nonref_string_path" to enumNonrefStringPath.value,
|
||||
"enum_ref_string_path" to enumRefStringPath,
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.GET,
|
||||
path = "/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,305 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
import org.springframework.web.client.RestClient
|
||||
import org.springframework.web.client.RestClientResponseException
|
||||
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.http.MediaType
|
||||
|
||||
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.StringEnumRef
|
||||
import org.openapitools.client.models.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class QueryApi(client: RestClient) : ApiClient(client) {
|
||||
|
||||
constructor(baseUrl: String) : this(RestClient.builder()
|
||||
.baseUrl(baseUrl)
|
||||
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||
.build()
|
||||
)
|
||||
|
||||
/**
|
||||
* enum for parameter enumNonrefStringQuery
|
||||
*/
|
||||
enum class EnumNonrefStringQueryTestEnumRefString(val value: kotlin.String) {
|
||||
@JsonProperty(value = "success") success("success"),
|
||||
@JsonProperty(value = "failure") failure("failure"),
|
||||
@JsonProperty(value = "unclassified") unclassified("unclassified"),
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEnumRefString(enumNonrefStringQuery: EnumNonrefStringQueryTestEnumRefString? = null, enumRefStringQuery: StringEnumRef? = null): kotlin.String {
|
||||
val result = testEnumRefStringWithHttpInfo(enumNonrefStringQuery = enumNonrefStringQuery, enumRefStringQuery = enumRefStringQuery)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testEnumRefStringWithHttpInfo(enumNonrefStringQuery: EnumNonrefStringQueryTestEnumRefString? = null, enumRefStringQuery: StringEnumRef? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testEnumRefStringRequestConfig(enumNonrefStringQuery = enumNonrefStringQuery, enumRefStringQuery = enumRefStringQuery)
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testEnumRefStringRequestConfig(enumNonrefStringQuery: EnumNonrefStringQueryTestEnumRefString? = null, enumRefStringQuery: StringEnumRef? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
.apply {
|
||||
if (enumNonrefStringQuery != null) {
|
||||
put("enum_nonref_string_query", listOf(enumNonrefStringQuery.toString()))
|
||||
}
|
||||
if (enumRefStringQuery != null) {
|
||||
put("enum_ref_string_query", listOf(enumRefStringQuery.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.GET,
|
||||
path = "/query/enum_ref_string",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryDatetimeDateString(datetimeQuery: java.time.OffsetDateTime? = null, dateQuery: java.time.LocalDate? = null, stringQuery: kotlin.String? = null): kotlin.String {
|
||||
val result = testQueryDatetimeDateStringWithHttpInfo(datetimeQuery = datetimeQuery, dateQuery = dateQuery, stringQuery = stringQuery)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryDatetimeDateStringWithHttpInfo(datetimeQuery: java.time.OffsetDateTime? = null, dateQuery: java.time.LocalDate? = null, stringQuery: kotlin.String? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testQueryDatetimeDateStringRequestConfig(datetimeQuery = datetimeQuery, dateQuery = dateQuery, stringQuery = stringQuery)
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testQueryDatetimeDateStringRequestConfig(datetimeQuery: java.time.OffsetDateTime? = null, dateQuery: java.time.LocalDate? = null, stringQuery: kotlin.String? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
.apply {
|
||||
if (datetimeQuery != null) {
|
||||
put("datetime_query", listOf(parseDateToQueryString(datetimeQuery)))
|
||||
}
|
||||
if (dateQuery != null) {
|
||||
put("date_query", listOf(parseDateToQueryString(dateQuery)))
|
||||
}
|
||||
if (stringQuery != null) {
|
||||
put("string_query", listOf(stringQuery.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.GET,
|
||||
path = "/query/datetime/date/string",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryIntegerBooleanString(integerQuery: kotlin.Int? = null, booleanQuery: kotlin.Boolean? = null, stringQuery: kotlin.String? = null): kotlin.String {
|
||||
val result = testQueryIntegerBooleanStringWithHttpInfo(integerQuery = integerQuery, booleanQuery = booleanQuery, stringQuery = stringQuery)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryIntegerBooleanStringWithHttpInfo(integerQuery: kotlin.Int? = null, booleanQuery: kotlin.Boolean? = null, stringQuery: kotlin.String? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testQueryIntegerBooleanStringRequestConfig(integerQuery = integerQuery, booleanQuery = booleanQuery, stringQuery = stringQuery)
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testQueryIntegerBooleanStringRequestConfig(integerQuery: kotlin.Int? = null, booleanQuery: kotlin.Boolean? = null, stringQuery: kotlin.String? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
.apply {
|
||||
if (integerQuery != null) {
|
||||
put("integer_query", listOf(integerQuery.toString()))
|
||||
}
|
||||
if (booleanQuery != null) {
|
||||
put("boolean_query", listOf(booleanQuery.toString()))
|
||||
}
|
||||
if (stringQuery != null) {
|
||||
put("string_query", listOf(stringQuery.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.GET,
|
||||
path = "/query/integer/boolean/string",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryStyleDeepObjectExplodeTrueObject(queryObject: Pet? = null): kotlin.String {
|
||||
val result = testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject = queryObject)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject: Pet? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testQueryStyleDeepObjectExplodeTrueObjectRequestConfig(queryObject = queryObject)
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testQueryStyleDeepObjectExplodeTrueObjectRequestConfig(queryObject: Pet? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
.apply {
|
||||
if (queryObject != null) {
|
||||
put("query_object", listOf(queryObject.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.GET,
|
||||
path = "/query/style_deepObject/explode_true/object",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryStyleFormExplodeTrueArrayString(queryObject: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? = null): kotlin.String {
|
||||
val result = testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject = queryObject)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testQueryStyleFormExplodeTrueArrayStringRequestConfig(queryObject = queryObject)
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testQueryStyleFormExplodeTrueArrayStringRequestConfig(queryObject: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
.apply {
|
||||
if (queryObject != null) {
|
||||
put("query_object", listOf(queryObject.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.GET,
|
||||
path = "/query/style_form/explode_true/array_string",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryStyleFormExplodeTrueObject(queryObject: Pet? = null): kotlin.String {
|
||||
val result = testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject = queryObject)
|
||||
return result.body!!
|
||||
}
|
||||
|
||||
@Throws(RestClientResponseException::class)
|
||||
fun testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject: Pet? = null): ResponseEntity<kotlin.String> {
|
||||
val localVariableConfig = testQueryStyleFormExplodeTrueObjectRequestConfig(queryObject = queryObject)
|
||||
return request<Unit, kotlin.String>(
|
||||
localVariableConfig
|
||||
)
|
||||
}
|
||||
|
||||
fun testQueryStyleFormExplodeTrueObjectRequestConfig(queryObject: Pet? = null) : RequestConfig<Unit> {
|
||||
val localVariableBody = null
|
||||
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||
.apply {
|
||||
if (queryObject != null) {
|
||||
put("query_object", listOf(queryObject.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
localVariableHeaders["Accept"] = "text/plain"
|
||||
|
||||
val params = mutableMapOf<String, Any>(
|
||||
)
|
||||
|
||||
return RequestConfig(
|
||||
method = RequestMethod.GET,
|
||||
path = "/query/style_form/explode_true/object",
|
||||
params = params,
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
body = localVariableBody
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
typealias MultiValueMap = MutableMap<String,List<String>>
|
||||
|
||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||
"csv" -> ","
|
||||
"tsv" -> "\t"
|
||||
"pipe" -> "|"
|
||||
"space" -> " "
|
||||
else -> ""
|
||||
}
|
||||
|
||||
val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" }
|
||||
|
||||
fun <T : Any?> toMultiValue(items: Array<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter)
|
||||
= toMultiValue(items.asIterable(), collectionFormat, map)
|
||||
|
||||
fun <T : Any?> toMultiValue(items: Iterable<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List<String> {
|
||||
return when(collectionFormat) {
|
||||
"multi" -> items.map(map)
|
||||
else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package org.openapitools.client.infrastructure;
|
||||
|
||||
import org.springframework.core.ParameterizedTypeReference
|
||||
import org.springframework.http.HttpHeaders
|
||||
import org.springframework.http.HttpMethod
|
||||
import org.springframework.http.MediaType
|
||||
import org.springframework.web.client.RestClient
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.util.LinkedMultiValueMap
|
||||
|
||||
open class ApiClient(protected val client: RestClient) {
|
||||
|
||||
protected inline fun <reified I : Any, reified T: Any?> request(requestConfig: RequestConfig<I>): ResponseEntity<T> {
|
||||
return prepare(defaults(requestConfig))
|
||||
.retrieve()
|
||||
.toEntity(object : ParameterizedTypeReference<T>() {})
|
||||
}
|
||||
|
||||
protected fun <I : Any> prepare(requestConfig: RequestConfig<I>) =
|
||||
client.method(requestConfig)
|
||||
.uri(requestConfig)
|
||||
.headers(requestConfig)
|
||||
.nullableBody(requestConfig)
|
||||
|
||||
protected fun <I> defaults(requestConfig: RequestConfig<I>) =
|
||||
requestConfig.apply {
|
||||
if (body != null && headers[HttpHeaders.CONTENT_TYPE].isNullOrEmpty()) {
|
||||
headers[HttpHeaders.CONTENT_TYPE] = MediaType.APPLICATION_JSON_VALUE
|
||||
}
|
||||
if (headers[HttpHeaders.ACCEPT].isNullOrEmpty()) {
|
||||
headers[HttpHeaders.ACCEPT] = MediaType.APPLICATION_JSON_VALUE
|
||||
}
|
||||
}
|
||||
|
||||
private fun <I> RestClient.method(requestConfig: RequestConfig<I>)=
|
||||
method(HttpMethod.valueOf(requestConfig.method.name))
|
||||
|
||||
private fun <I> RestClient.RequestBodyUriSpec.uri(requestConfig: RequestConfig<I>) =
|
||||
uri { builder ->
|
||||
builder
|
||||
.path(requestConfig.path)
|
||||
.queryParams(LinkedMultiValueMap(requestConfig.query))
|
||||
.build(requestConfig.params)
|
||||
}
|
||||
|
||||
private fun <I> RestClient.RequestBodySpec.headers(requestConfig: RequestConfig<I>) =
|
||||
apply { requestConfig.headers.forEach { (name, value) -> header(name, value) } }
|
||||
|
||||
private fun <I : Any> RestClient.RequestBodySpec.nullableBody(requestConfig: RequestConfig<I>) =
|
||||
apply { if (requestConfig.body != null) body(requestConfig.body) }
|
||||
}
|
||||
|
||||
inline fun <reified T: Any> parseDateToQueryString(value : T): String {
|
||||
/*
|
||||
.replace("\"", "") converts the json object string to an actual string for the query parameter.
|
||||
The moshi or gson adapter allows a more generic solution instead of trying to use a native
|
||||
formatter. It also easily allows to provide a simple way to define a custom date format pattern
|
||||
inside a gson/moshi adapter.
|
||||
*/
|
||||
return Serializer.jacksonObjectMapper.writeValueAsString(value).replace("\"", "")
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
/**
|
||||
* Defines a config object for a given part of a multi-part request.
|
||||
* NOTE: Headers is a Map<String,String> because rfc2616 defines
|
||||
* multi-valued headers as csv-only.
|
||||
*/
|
||||
data class PartConfig<T>(
|
||||
val headers: MutableMap<String, String> = mutableMapOf(),
|
||||
val body: T? = null
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
/**
|
||||
* Defines a config object for a given request.
|
||||
* NOTE: This object doesn't include 'body' because it
|
||||
* allows for caching of the constructed object
|
||||
* for many request definitions.
|
||||
* NOTE: Headers is a Map<String,String> because rfc2616 defines
|
||||
* multi-valued headers as csv-only.
|
||||
*/
|
||||
data class RequestConfig<T>(
|
||||
val method: RequestMethod,
|
||||
val path: String,
|
||||
val headers: MutableMap<String, String> = mutableMapOf(),
|
||||
val params: MutableMap<String, Any> = mutableMapOf(),
|
||||
val query: MutableMap<String, List<String>> = mutableMapOf(),
|
||||
val requiresAuthentication: Boolean,
|
||||
val body: T? = null
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
/**
|
||||
* Provides enumerated HTTP verbs
|
||||
*/
|
||||
enum class RequestMethod {
|
||||
GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
|
||||
.findAndRegisterModules()
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, true)
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param propertySize
|
||||
* @param color
|
||||
*/
|
||||
|
||||
|
||||
data class Bird (
|
||||
|
||||
@field:JsonProperty("size")
|
||||
val propertySize: kotlin.String? = null,
|
||||
|
||||
@field:JsonProperty("color")
|
||||
val color: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
|
||||
|
||||
data class Category (
|
||||
|
||||
@field:JsonProperty("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@field:JsonProperty("name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import org.openapitools.client.models.StringEnumRef
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
* to test the default value of properties
|
||||
*
|
||||
* @param arrayStringEnumRefDefault
|
||||
* @param arrayStringEnumDefault
|
||||
* @param arrayStringDefault
|
||||
* @param arrayIntegerDefault
|
||||
* @param arrayString
|
||||
* @param arrayStringNullable
|
||||
* @param arrayStringExtensionNullable
|
||||
* @param stringNullable
|
||||
*/
|
||||
|
||||
|
||||
data class DefaultValue (
|
||||
|
||||
@field:JsonProperty("array_string_enum_ref_default")
|
||||
val arrayStringEnumRefDefault: kotlin.collections.List<StringEnumRef>? = null,
|
||||
|
||||
@field:JsonProperty("array_string_enum_default")
|
||||
val arrayStringEnumDefault: kotlin.collections.List<DefaultValue.ArrayStringEnumDefault>? = null,
|
||||
|
||||
@field:JsonProperty("array_string_default")
|
||||
val arrayStringDefault: kotlin.collections.List<kotlin.String>? = arrayListOf("failure","skipped"),
|
||||
|
||||
@field:JsonProperty("array_integer_default")
|
||||
val arrayIntegerDefault: kotlin.collections.List<kotlin.Int>? = arrayListOf(1,3),
|
||||
|
||||
@field:JsonProperty("array_string")
|
||||
val arrayString: kotlin.collections.List<kotlin.String>? = null,
|
||||
|
||||
@field:JsonProperty("array_string_nullable")
|
||||
val arrayStringNullable: kotlin.collections.List<kotlin.String>? = null,
|
||||
|
||||
@field:JsonProperty("array_string_extension_nullable")
|
||||
val arrayStringExtensionNullable: kotlin.collections.List<kotlin.String>? = null,
|
||||
|
||||
@field:JsonProperty("string_nullable")
|
||||
val stringNullable: kotlin.String? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Values: success,failure,unclassified,unknownDefaultOpenApi
|
||||
*/
|
||||
enum class ArrayStringEnumDefault(val value: kotlin.String) {
|
||||
@JsonProperty(value = "success") success("success"),
|
||||
@JsonProperty(value = "failure") failure("failure"),
|
||||
@JsonProperty(value = "unclassified") unclassified("unclassified"),
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param number
|
||||
* @param float
|
||||
* @param double
|
||||
*/
|
||||
|
||||
|
||||
data class NumberPropertiesOnly (
|
||||
|
||||
@field:JsonProperty("number")
|
||||
val number: java.math.BigDecimal? = null,
|
||||
|
||||
@field:JsonProperty("float")
|
||||
val float: kotlin.Float? = null,
|
||||
|
||||
@field:JsonProperty("double")
|
||||
val double: kotlin.Double? = null
|
||||
|
||||
)
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* @param photoUrls
|
||||
* @param id
|
||||
* @param category
|
||||
* @param tags
|
||||
* @param status pet status in the store
|
||||
*/
|
||||
|
||||
|
||||
data class Pet (
|
||||
|
||||
@field:JsonProperty("name")
|
||||
val name: kotlin.String,
|
||||
|
||||
@field:JsonProperty("photoUrls")
|
||||
val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
|
||||
@field:JsonProperty("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@field:JsonProperty("category")
|
||||
val category: Category? = null,
|
||||
|
||||
@field:JsonProperty("tags")
|
||||
val tags: kotlin.collections.List<Tag>? = null,
|
||||
|
||||
/* pet status in the store */
|
||||
@field:JsonProperty("status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
*
|
||||
* Values: available,pending,sold,unknownDefaultOpenApi
|
||||
*/
|
||||
enum class Status(val value: kotlin.String) {
|
||||
@JsonProperty(value = "available") available("available"),
|
||||
@JsonProperty(value = "pending") pending("pending"),
|
||||
@JsonProperty(value = "sold") sold("sold"),
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id Query
|
||||
* @param outcomes
|
||||
*/
|
||||
|
||||
|
||||
data class Query (
|
||||
|
||||
/* Query */
|
||||
@field:JsonProperty("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@field:JsonProperty("outcomes")
|
||||
val outcomes: kotlin.collections.List<Query.Outcomes>? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Values: sUCCESS,fAILURE,sKIPPED,unknownDefaultOpenApi
|
||||
*/
|
||||
enum class Outcomes(val value: kotlin.String) {
|
||||
@JsonProperty(value = "SUCCESS") sUCCESS("SUCCESS"),
|
||||
@JsonProperty(value = "FAILURE") fAILURE("FAILURE"),
|
||||
@JsonProperty(value = "SKIPPED") sKIPPED("SKIPPED"),
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Values: success,failure,unclassified,unknownDefaultOpenApi
|
||||
*/
|
||||
|
||||
enum class StringEnumRef(val value: kotlin.String) {
|
||||
|
||||
@JsonProperty(value = "success")
|
||||
success("success"),
|
||||
|
||||
@JsonProperty(value = "failure")
|
||||
failure("failure"),
|
||||
|
||||
@JsonProperty(value = "unclassified")
|
||||
unclassified("unclassified"),
|
||||
|
||||
@JsonProperty(value = "unknown_default_open_api")
|
||||
unknownDefaultOpenApi("unknown_default_open_api");
|
||||
|
||||
/**
|
||||
* Override [toString()] to avoid using the enum variable name as the value, and instead use
|
||||
* the actual value defined in the API spec file.
|
||||
*
|
||||
* This solves a problem when the variable name and its value are different, and ensures that
|
||||
* the client sends the correct enum values to the server always.
|
||||
*/
|
||||
override fun toString(): kotlin.String = value
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Converts the provided [data] to a [String] on success, null otherwise.
|
||||
*/
|
||||
fun encode(data: kotlin.Any?): kotlin.String? = if (data is StringEnumRef) "$data" else null
|
||||
|
||||
/**
|
||||
* Returns a valid [StringEnumRef] for [data], null otherwise.
|
||||
*/
|
||||
fun decode(data: kotlin.Any?): StringEnumRef? = data?.let {
|
||||
val normalizedData = "$it".lowercase()
|
||||
values().firstOrNull { value ->
|
||||
it == value || normalizedData == "$value".lowercase()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
*/
|
||||
|
||||
|
||||
data class Tag (
|
||||
|
||||
@field:JsonProperty("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@field:JsonProperty("name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param propertyValues
|
||||
*/
|
||||
|
||||
|
||||
data class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter (
|
||||
|
||||
@field:JsonProperty("values")
|
||||
val propertyValues: kotlin.collections.List<kotlin.String>? = null
|
||||
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user