[Kotlin][multiplatform] minor improvements (#3931)

* minor enhancement to kotlin multi platform client

* better code format

* fix kotlin test

* use build

* update kotlin openapi3 sample
This commit is contained in:
William Cheng 2019-09-22 10:00:26 +08:00 committed by GitHub
parent 21e0e0d5d5
commit 91a610ec0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 186 additions and 494 deletions

1
.gitignore vendored
View File

@ -186,6 +186,7 @@ samples/client/petstore/kotlin-string/build
samples/openapi3/client/petstore/kotlin/build
samples/server/petstore/kotlin-server/ktor/build
samples/server/petstore/kotlin-springboot/build
samples/client/petstore/kotlin-multiplatform/build/
\?
# haskell

View File

@ -701,6 +701,7 @@ Here is a list of template creators:
* Javascript (Flow types) @jaypea
* JMeter: @davidkiss
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Kotlin (MultiPlatform): @andrewemery
* Lua: @daurnimator
* Nim: @hokamoto
* OCaml: @cgensoul

View File

@ -21,6 +21,7 @@ declare -a scripts=(
"./bin/openapi3/jaxrs-jersey-petstore.sh"
"./bin/spring-all-petstore.sh"
"./bin/javascript-petstore-all.sh"
"./bin/kotlin-client-petstore-multiplatform.sh"
"./bin/kotlin-client-petstore.sh"
"./bin/kotlin-client-string.sh"
"./bin/kotlin-client-threetenbp.sh"

View File

@ -35,30 +35,44 @@ class {{classname}} @UseExperimental(UnstableDefault::class) constructor(
* {{notes}}
{{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
{{/allParams}}* @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
*/{{#returnType}}
@Suppress("UNCHECKED_CAST"){{/returnType}}
*/
{{#returnType}}
@Suppress("UNCHECKED_CAST")
{{/returnType}}
suspend fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : HttpResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> {
val localVariableBody = {{#hasBodyParam}}{{#bodyParam}}{{#isListContainer}}{{operationIdCamelCase}}Request({{paramName}}.asList()){{/isListContainer}}{{^isListContainer}}{{#isMapContainer}}{{operationIdCamelCase}}Request({{paramName}}){{/isMapContainer}}{{^isMapContainer}}{{paramName}}{{/isMapContainer}}{{/isListContainer}}{{/bodyParam}}{{/hasBodyParam}}
{{^hasBodyParam}}{{#hasFormParams}}{{#isMultipart}}formData {
{{^hasBodyParam}}
{{#hasFormParams}}
{{#isMultipart}}
formData {
{{#formParams}}
{{paramName}}?.apply { append("{{{baseName}}}", {{paramName}}) }
{{/formParams}}
}{{/isMultipart}}{{^isMultipart}}ParametersBuilder().also {
}
{{/isMultipart}}
{{^isMultipart}}
ParametersBuilder().also {
{{#formParams}}
{{paramName}}?.apply { it.append("{{{baseName}}}", {{paramName}}.toString()) }
{{/formParams}}
}.build(){{/isMultipart}}{{/hasFormParams}}{{^hasFormParams}}io.ktor.client.utils.EmptyContent{{/hasFormParams}}{{/hasBodyParam}}
}.build()
{{/isMultipart}}
{{/hasFormParams}}
{{^hasFormParams}}
io.ktor.client.utils.EmptyContent
{{/hasFormParams}}
{{/hasBodyParam}}
val localVariableQuery = mutableMapOf<String, List<String>>()
{{#hasQueryParams}}{{#queryParams}}
{{#queryParams}}
{{paramName}}?.apply { localVariableQuery["{{baseName}}"] = {{#isContainer}}toMultiValue(this, "{{collectionFormat}}"){{/isContainer}}{{^isContainer}}listOf("${{paramName}}"){{/isContainer}} }
{{/queryParams}}{{/hasQueryParams}}
{{/queryParams}}
val localVariableHeaders = mutableMapOf<String, String>()
{{#hasHeaderParams}}{{#headerParams}}
{{#headerParams}}
{{paramName}}?.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} }
{{/headerParams}}{{/hasHeaderParams}}
{{/headerParams}}
val localVariableConfig = RequestConfig(
RequestMethod.{{httpMethod}},
@ -73,16 +87,34 @@ class {{classname}} @UseExperimental(UnstableDefault::class) constructor(
).{{#isListContainer}}wrap<{{operationIdCamelCase}}Response>().map { value.toTypedArray() }{{/isListContainer}}{{^isListContainer}}{{#isMapContainer}}wrap<{{operationIdCamelCase}}Response>().map { value }{{/isMapContainer}}{{^isMapContainer}}wrap(){{/isMapContainer}}{{/isListContainer}}
}
{{#hasBodyParam}}{{#bodyParam}}{{#isListContainer}}{{>serial_wrapper_request_list}}{{/isListContainer}}{{#isMapContainer}}{{>serial_wrapper_request_map}}{{/isMapContainer}}{{/bodyParam}}{{/hasBodyParam}}
{{#isListContainer}}{{>serial_wrapper_response_list}}{{/isListContainer}}{{#isMapContainer}}{{>serial_wrapper_response_map}}{{/isMapContainer}}
{{#hasBodyParam}}
{{#bodyParam}}
{{#isListContainer}}{{>serial_wrapper_request_list}}{{/isListContainer}}{{#isMapContainer}}{{>serial_wrapper_request_map}}{{/isMapContainer}}
{{/bodyParam}}
{{/hasBodyParam}}
{{#isListContainer}}
{{>serial_wrapper_response_list}}
{{/isListContainer}}
{{#isMapContainer}}
{{>serial_wrapper_response_map}}
{{/isMapContainer}}
{{/operation}}
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
{{#operation}}
{{#hasBodyParam}}{{#bodyParam}}{{#isListContainer}}serializer.setMapper({{operationIdCamelCase}}Request::class, {{operationIdCamelCase}}Request.serializer()){{/isListContainer}}{{#isMapContainer}}serializer.setMapper({{operationIdCamelCase}}Request::class, {{operationIdCamelCase}}Request.serializer()){{/isMapContainer}}{{/bodyParam}}{{/hasBodyParam}}
{{#isListContainer}}serializer.setMapper({{operationIdCamelCase}}Response::class, {{operationIdCamelCase}}Response.serializer()){{/isListContainer}}{{#isMapContainer}}serializer.setMapper({{operationIdCamelCase}}Response::class, {{operationIdCamelCase}}Response.serializer()){{/isMapContainer}}
{{#hasBodyParam}}
{{#bodyParam}}
{{#isListContainer}}serializer.setMapper({{operationIdCamelCase}}Request::class, {{operationIdCamelCase}}Request.serializer()){{/isListContainer}}{{#isMapContainer}}serializer.setMapper({{operationIdCamelCase}}Request::class, {{operationIdCamelCase}}Request.serializer()){{/isMapContainer}}
{{/bodyParam}}
{{/hasBodyParam}}
{{#isListContainer}}
serializer.setMapper({{operationIdCamelCase}}Response::class, {{operationIdCamelCase}}Response.serializer())
{{/isListContainer}}
{{#isMapContainer}}
serializer.setMapper({{operationIdCamelCase}}Response::class, {{operationIdCamelCase}}Response.serializer())
{{/isMapContainer}}
{{/operation}}
}
}

View File

@ -1244,6 +1244,7 @@
<module>samples/client/petstore/elixir</module>
<module>samples/client/petstore/erlang-client</module>
<module>samples/client/petstore/erlang-proper</module>
<module>samples/client/petstore/kotlin-multiplatform</module>
<module>samples/client/petstore/kotlin/</module>
<module>samples/client/petstore/kotlin-threetenbp/</module>
<module>samples/client/petstore/kotlin-string/</module>

View File

@ -0,0 +1,47 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>KotlinMultiPlatformClientTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>Kotlin MultiPlatform Petstore Client</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>bundle-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>/bin/bash</executable>
<arguments>
<argument>gradlew</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -48,13 +48,10 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = body
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/pet",
@ -70,7 +67,6 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
/**
* Deletes a pet
*
@ -85,12 +81,9 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
apiKey?.apply { localVariableHeaders["api_key"] = this.toString() }
val localVariableConfig = RequestConfig(
RequestMethod.DELETE,
"/pet/{petId}".replace("{"+"petId"+"}", "$petId"),
@ -105,8 +98,6 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
@ -120,13 +111,10 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
io.ktor.client.utils.EmptyContent
val localVariableQuery = mutableMapOf<String, List<String>>()
status?.apply { localVariableQuery["status"] = toMultiValue(this, "csv") }
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/pet/findByStatus",
@ -140,7 +128,6 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
).wrap<FindPetsByStatusResponse>().map { value.toTypedArray() }
}
@Serializable
private class FindPetsByStatusResponse(val value: List<Pet>) {
@Serializer(FindPetsByStatusResponse::class)
@ -165,13 +152,10 @@ private class FindPetsByStatusResponse(val value: List<Pet>) {
io.ktor.client.utils.EmptyContent
val localVariableQuery = mutableMapOf<String, List<String>>()
tags?.apply { localVariableQuery["tags"] = toMultiValue(this, "csv") }
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/pet/findByTags",
@ -185,7 +169,6 @@ private class FindPetsByStatusResponse(val value: List<Pet>) {
).wrap<FindPetsByTagsResponse>().map { value.toTypedArray() }
}
@Serializable
private class FindPetsByTagsResponse(val value: List<Pet>) {
@Serializer(FindPetsByTagsResponse::class)
@ -211,10 +194,8 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/pet/{petId}".replace("{"+"petId"+"}", "$petId"),
@ -229,8 +210,6 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
}
/**
* Update an existing pet
*
@ -241,13 +220,10 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableBody = body
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PUT,
"/pet",
@ -263,7 +239,6 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
/**
* Updates a pet in the store with form data
*
@ -276,16 +251,14 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableBody =
ParametersBuilder().also {
name?.apply { it.append("name", name) }
status?.apply { it.append("status", status) }
name?.apply { it.append("name", name.toString()) }
status?.apply { it.append("status", status.toString()) }
}.build()
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/pet/{petId}".replace("{"+"petId"+"}", "$petId"),
@ -300,8 +273,6 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
}
/**
* uploads an image
*
@ -321,10 +292,8 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"),
@ -340,26 +309,12 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
serializer.setMapper(FindPetsByStatusResponse::class, FindPetsByStatusResponse.serializer())
serializer.setMapper(FindPetsByTagsResponse::class, FindPetsByTagsResponse.serializer())
}
}
}

View File

@ -50,10 +50,8 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.DELETE,
"/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"),
@ -68,8 +66,6 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor(
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@ -83,10 +79,8 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/store/inventory",
@ -100,7 +94,6 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor(
).wrap<GetInventoryResponse>().map { value }
}
@Serializable
private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
@Serializer(GetInventoryResponse::class)
@ -126,10 +119,8 @@ private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"),
@ -144,8 +135,6 @@ private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
}
/**
* Place an order for a pet
*
@ -157,13 +146,10 @@ private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
val localVariableBody = body
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/store/order",
@ -180,17 +166,10 @@ private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
serializer.setMapper(GetInventoryResponse::class, GetInventoryResponse.serializer())
}
}
}

View File

@ -47,13 +47,10 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = body
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/user",
@ -69,7 +66,6 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor(
/**
* Creates list of users with given input array
*
@ -80,13 +76,10 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = CreateUsersWithArrayInputRequest(body.asList())
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/user/createWithArray",
@ -111,7 +104,6 @@ private class CreateUsersWithArrayInputRequest(val value: List<User>) {
}
}
/**
* Creates list of users with given input array
*
@ -122,13 +114,10 @@ private class CreateUsersWithArrayInputRequest(val value: List<User>) {
val localVariableBody = CreateUsersWithListInputRequest(body.asList())
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/user/createWithList",
@ -153,7 +142,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
}
/**
* Delete user
* This can only be done by the logged in user.
@ -167,10 +155,8 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.DELETE,
"/user/{username}".replace("{"+"username"+"}", "$username"),
@ -185,8 +171,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
/**
* Get user by user name
*
@ -201,10 +185,8 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/user/{username}".replace("{"+"username"+"}", "$username"),
@ -219,8 +201,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
/**
* Logs user into the system
*
@ -235,15 +215,11 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
io.ktor.client.utils.EmptyContent
val localVariableQuery = mutableMapOf<String, List<String>>()
username?.apply { localVariableQuery["username"] = listOf("$username") }
password?.apply { localVariableQuery["password"] = listOf("$password") }
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/user/login",
@ -258,8 +234,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
/**
* Logs out current logged in user session
*
@ -272,10 +246,8 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/user/logout",
@ -290,8 +262,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
/**
* Updated user
* This can only be done by the logged in user.
@ -303,13 +273,10 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
val localVariableBody = body
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PUT,
"/user/{username}".replace("{"+"username"+"}", "$username"),
@ -326,25 +293,12 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
serializer.setMapper(CreateUsersWithArrayInputRequest::class, CreateUsersWithArrayInputRequest.serializer())
serializer.setMapper(CreateUsersWithListInputRequest::class, CreateUsersWithListInputRequest.serializer())
}
}
}

View File

@ -27,4 +27,3 @@ data class ApiResponse (
@SerialName(value = "message") val message: kotlin.String? = null
)

View File

@ -25,4 +25,3 @@ data class Category (
@SerialName(value = "name") val name: kotlin.String? = null
)

View File

@ -33,8 +33,8 @@ data class Order (
@SerialName(value = "status") val status: Order.Status? = null,
@SerialName(value = "complete") val complete: kotlin.Boolean? = null
)
{
/**
* Order Status
* Values: placed,approved,delivered
@ -51,6 +51,6 @@ data class Order (
object Serializer : CommonEnumSerializer<Status>("Status", values(), values().map { it.value }.toTypedArray())
}
}

View File

@ -35,8 +35,8 @@ data class Pet (
/* pet status in the store */
@SerialName(value = "status") val status: Pet.Status? = null
)
{
/**
* pet status in the store
* Values: available,pending,sold
@ -53,6 +53,6 @@ data class Pet (
object Serializer : CommonEnumSerializer<Status>("Status", values(), values().map { it.value }.toTypedArray())
}
}

View File

@ -25,4 +25,3 @@ data class Tag (
@SerialName(value = "name") val name: kotlin.String? = null
)

View File

@ -38,4 +38,3 @@ data class User (
@SerialName(value = "userStatus") val userStatus: kotlin.Int? = null
)

View File

@ -4,8 +4,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file** | [**java.io.File**](java.io.File.md) | | [optional]
**files** | [**kotlin.Array&lt;java.io.File&gt;**](java.io.File.md) | | [optional]
**file** | [**io.ktor.client.request.forms.InputProvider**](io.ktor.client.request.forms.InputProvider.md) | | [optional]
**files** | [**kotlin.Array&lt;io.ktor.client.request.forms.InputProvider&gt;**](io.ktor.client.request.forms.InputProvider.md) | | [optional]

View File

@ -15,7 +15,7 @@ Name | Type | Description | Notes
**binary** | [**io.ktor.client.request.forms.InputProvider**](io.ktor.client.request.forms.InputProvider.md) | | [optional]
**date** | **kotlin.String** | |
**dateTime** | **kotlin.String** | | [optional]
**uuid** | [**java.util.UUID**](java.util.UUID.md) | | [optional]
**uuid** | **kotlin.String** | | [optional]
**password** | **kotlin.String** | |
**patternWithDigits** | **kotlin.String** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**patternWithDigitsAndDelimiter** | **kotlin.String** | A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01. | [optional]

View File

@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | [**java.util.UUID**](java.util.UUID.md) | | [optional]
**uuid** | **kotlin.String** | | [optional]
**dateTime** | **kotlin.String** | | [optional]
**map** | [**kotlin.collections.Map&lt;kotlin.String, Animal&gt;**](Animal.md) | | [optional]

View File

@ -48,13 +48,10 @@ class AnotherFakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = client
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PATCH,
"/another-fake/dummy",
@ -71,11 +68,9 @@ class AnotherFakeApi @UseExperimental(UnstableDefault::class) constructor(
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
}
}
}

View File

@ -50,10 +50,8 @@ class DefaultApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/foo",
@ -69,12 +67,8 @@ class DefaultApi @UseExperimental(UnstableDefault::class) constructor(
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
}
}
}

View File

@ -54,10 +54,8 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/fake/health",
@ -72,8 +70,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
}
/**
*
* Test serialization of outer boolean types
@ -85,13 +81,10 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = body
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/fake/outer/boolean",
@ -107,7 +100,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
/**
*
* Test serialization of object with outer number type
@ -119,13 +111,10 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = outerComposite
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/fake/outer/composite",
@ -141,7 +130,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
/**
*
* Test serialization of outer number types
@ -153,13 +141,10 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = body
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/fake/outer/number",
@ -175,7 +160,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
/**
*
* Test serialization of outer string types
@ -187,13 +171,10 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = body
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/fake/outer/string",
@ -209,7 +190,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
/**
*
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
@ -220,13 +200,10 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = fileSchemaTestClass
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PUT,
"/fake/body-with-file-schema",
@ -242,7 +219,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
/**
*
*
@ -254,15 +230,11 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = user
val localVariableQuery = mutableMapOf<String, List<String>>()
query?.apply { localVariableQuery["query"] = listOf("$query") }
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PUT,
"/fake/body-with-query-params",
@ -278,7 +250,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
@ -290,13 +261,10 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = client
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PATCH,
"/fake",
@ -312,7 +280,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@ -354,10 +321,8 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/fake",
@ -372,8 +337,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
}
/**
* To test enum parameters
* To test enum parameters
@ -396,23 +359,15 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
}.build()
val localVariableQuery = mutableMapOf<String, List<String>>()
enumQueryStringArray?.apply { localVariableQuery["enum_query_string_array"] = toMultiValue(this, "multi") }
enumQueryString?.apply { localVariableQuery["enum_query_string"] = listOf("$enumQueryString") }
enumQueryInteger?.apply { localVariableQuery["enum_query_integer"] = listOf("$enumQueryInteger") }
enumQueryDouble?.apply { localVariableQuery["enum_query_double"] = listOf("$enumQueryDouble") }
val localVariableHeaders = mutableMapOf<String, String>()
enumHeaderStringArray?.apply { localVariableHeaders["enum_header_string_array"] = this.joinToString(separator = collectionDelimiter("csv")) }
enumHeaderString?.apply { localVariableHeaders["enum_header_string"] = this.toString() }
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/fake",
@ -427,8 +382,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
}
/**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
@ -446,23 +399,15 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
io.ktor.client.utils.EmptyContent
val localVariableQuery = mutableMapOf<String, List<String>>()
requiredStringGroup?.apply { localVariableQuery["required_string_group"] = listOf("$requiredStringGroup") }
requiredInt64Group?.apply { localVariableQuery["required_int64_group"] = listOf("$requiredInt64Group") }
stringGroup?.apply { localVariableQuery["string_group"] = listOf("$stringGroup") }
int64Group?.apply { localVariableQuery["int64_group"] = listOf("$int64Group") }
val localVariableHeaders = mutableMapOf<String, String>()
requiredBooleanGroup?.apply { localVariableHeaders["required_boolean_group"] = this.toString() }
booleanGroup?.apply { localVariableHeaders["boolean_group"] = this.toString() }
val localVariableConfig = RequestConfig(
RequestMethod.DELETE,
"/fake",
@ -477,8 +422,6 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
}
/**
* test inline additionalProperties
*
@ -489,13 +432,10 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = TestInlineAdditionalPropertiesRequest(requestBody)
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/fake/inline-additionalProperties",
@ -520,7 +460,6 @@ private class TestInlineAdditionalPropertiesRequest(val value: Map<kotlin.String
}
}
/**
* test json serialization of form data
*
@ -538,10 +477,8 @@ private class TestInlineAdditionalPropertiesRequest(val value: Map<kotlin.String
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/fake/jsonFormData",
@ -556,8 +493,6 @@ private class TestInlineAdditionalPropertiesRequest(val value: Map<kotlin.String
}
/**
*
* To test the collection format in query parameters
@ -574,21 +509,14 @@ private class TestInlineAdditionalPropertiesRequest(val value: Map<kotlin.String
io.ktor.client.utils.EmptyContent
val localVariableQuery = mutableMapOf<String, List<String>>()
pipe?.apply { localVariableQuery["pipe"] = toMultiValue(this, "multi") }
ioutil?.apply { localVariableQuery["ioutil"] = toMultiValue(this, "csv") }
http?.apply { localVariableQuery["http"] = toMultiValue(this, "space") }
url?.apply { localVariableQuery["url"] = toMultiValue(this, "csv") }
context?.apply { localVariableQuery["context"] = toMultiValue(this, "multi") }
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PUT,
"/fake/test-query-paramters",
@ -604,26 +532,9 @@ private class TestInlineAdditionalPropertiesRequest(val value: Map<kotlin.String
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
@ -631,11 +542,6 @@ private class TestInlineAdditionalPropertiesRequest(val value: Map<kotlin.String
serializer.setMapper(TestInlineAdditionalPropertiesRequest::class, TestInlineAdditionalPropertiesRequest.serializer())
}
}
}

View File

@ -48,13 +48,10 @@ class FakeClassnameTags123Api @UseExperimental(UnstableDefault::class) construct
val localVariableBody = client
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PATCH,
"/fake_classname_test",
@ -71,11 +68,9 @@ class FakeClassnameTags123Api @UseExperimental(UnstableDefault::class) construct
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
}
}
}

View File

@ -48,13 +48,10 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = pet
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/pet",
@ -70,7 +67,6 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
/**
* Deletes a pet
*
@ -85,12 +81,9 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
apiKey?.apply { localVariableHeaders["api_key"] = this.toString() }
val localVariableConfig = RequestConfig(
RequestMethod.DELETE,
"/pet/{petId}".replace("{"+"petId"+"}", "$petId"),
@ -105,8 +98,6 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
@ -120,13 +111,10 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
io.ktor.client.utils.EmptyContent
val localVariableQuery = mutableMapOf<String, List<String>>()
status?.apply { localVariableQuery["status"] = toMultiValue(this, "csv") }
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/pet/findByStatus",
@ -140,7 +128,6 @@ class PetApi @UseExperimental(UnstableDefault::class) constructor(
).wrap<FindPetsByStatusResponse>().map { value.toTypedArray() }
}
@Serializable
private class FindPetsByStatusResponse(val value: List<Pet>) {
@Serializer(FindPetsByStatusResponse::class)
@ -165,13 +152,10 @@ private class FindPetsByStatusResponse(val value: List<Pet>) {
io.ktor.client.utils.EmptyContent
val localVariableQuery = mutableMapOf<String, List<String>>()
tags?.apply { localVariableQuery["tags"] = toMultiValue(this, "csv") }
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/pet/findByTags",
@ -185,7 +169,6 @@ private class FindPetsByStatusResponse(val value: List<Pet>) {
).wrap<FindPetsByTagsResponse>().map { value.toTypedArray() }
}
@Serializable
private class FindPetsByTagsResponse(val value: List<Pet>) {
@Serializer(FindPetsByTagsResponse::class)
@ -211,10 +194,8 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/pet/{petId}".replace("{"+"petId"+"}", "$petId"),
@ -229,8 +210,6 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
}
/**
* Update an existing pet
*
@ -241,13 +220,10 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableBody = pet
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PUT,
"/pet",
@ -263,7 +239,6 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
/**
* Updates a pet in the store with form data
*
@ -282,10 +257,8 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/pet/{petId}".replace("{"+"petId"+"}", "$petId"),
@ -300,8 +273,6 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
}
/**
* uploads an image
*
@ -321,10 +292,8 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"),
@ -339,8 +308,6 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
}
/**
* uploads an image (required)
*
@ -360,10 +327,8 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/fake/{petId}/uploadImageWithRequiredFile".replace("{"+"petId"+"}", "$petId"),
@ -379,28 +344,12 @@ private class FindPetsByTagsResponse(val value: List<Pet>) {
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
serializer.setMapper(FindPetsByStatusResponse::class, FindPetsByStatusResponse.serializer())
serializer.setMapper(FindPetsByTagsResponse::class, FindPetsByTagsResponse.serializer())
}
}
}

View File

@ -50,10 +50,8 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.DELETE,
"/store/order/{order_id}".replace("{"+"order_id"+"}", "$orderId"),
@ -68,8 +66,6 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor(
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@ -83,10 +79,8 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/store/inventory",
@ -100,7 +94,6 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor(
).wrap<GetInventoryResponse>().map { value }
}
@Serializable
private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
@Serializer(GetInventoryResponse::class)
@ -126,10 +119,8 @@ private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/store/order/{order_id}".replace("{"+"order_id"+"}", "$orderId"),
@ -144,8 +135,6 @@ private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
}
/**
* Place an order for a pet
*
@ -157,13 +146,10 @@ private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
val localVariableBody = order
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/store/order",
@ -180,17 +166,10 @@ private class GetInventoryResponse(val value: Map<kotlin.String, kotlin.Int>) {
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
serializer.setMapper(GetInventoryResponse::class, GetInventoryResponse.serializer())
}
}
}

View File

@ -47,13 +47,10 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = user
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/user",
@ -69,7 +66,6 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor(
/**
* Creates list of users with given input array
*
@ -80,13 +76,10 @@ class UserApi @UseExperimental(UnstableDefault::class) constructor(
val localVariableBody = CreateUsersWithArrayInputRequest(user.asList())
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/user/createWithArray",
@ -111,7 +104,6 @@ private class CreateUsersWithArrayInputRequest(val value: List<User>) {
}
}
/**
* Creates list of users with given input array
*
@ -122,13 +114,10 @@ private class CreateUsersWithArrayInputRequest(val value: List<User>) {
val localVariableBody = CreateUsersWithListInputRequest(user.asList())
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/user/createWithList",
@ -153,7 +142,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
}
/**
* Delete user
* This can only be done by the logged in user.
@ -167,10 +155,8 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.DELETE,
"/user/{username}".replace("{"+"username"+"}", "$username"),
@ -185,8 +171,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
/**
* Get user by user name
*
@ -201,10 +185,8 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/user/{username}".replace("{"+"username"+"}", "$username"),
@ -219,8 +201,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
/**
* Logs user into the system
*
@ -235,15 +215,11 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
io.ktor.client.utils.EmptyContent
val localVariableQuery = mutableMapOf<String, List<String>>()
username?.apply { localVariableQuery["username"] = listOf("$username") }
password?.apply { localVariableQuery["password"] = listOf("$password") }
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/user/login",
@ -258,8 +234,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
/**
* Logs out current logged in user session
*
@ -272,10 +246,8 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.GET,
"/user/logout",
@ -290,8 +262,6 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
}
/**
* Updated user
* This can only be done by the logged in user.
@ -303,13 +273,10 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
val localVariableBody = user
val localVariableQuery = mutableMapOf<String, List<String>>()
val localVariableHeaders = mutableMapOf<String, String>()
val localVariableConfig = RequestConfig(
RequestMethod.PUT,
"/user/{username}".replace("{"+"username"+"}", "$username"),
@ -326,25 +293,12 @@ private class CreateUsersWithListInputRequest(val value: List<User>) {
companion object {
internal fun setMappers(serializer: KotlinxSerializer) {
serializer.setMapper(CreateUsersWithArrayInputRequest::class, CreateUsersWithArrayInputRequest.serializer())
serializer.setMapper(CreateUsersWithListInputRequest::class, CreateUsersWithListInputRequest.serializer())
}
}
}

View File

@ -25,4 +25,3 @@ data class AdditionalPropertiesClass (
@SerialName(value = "mapOfMapProperty") val mapOfMapProperty: kotlin.collections.Map<kotlin.String, kotlin.collections.Map<kotlin.String, kotlin.String>>? = null
)

View File

@ -25,4 +25,3 @@ data class Animal (
@SerialName(value = "color") val color: kotlin.String? = null
)

View File

@ -27,4 +27,3 @@ data class ApiResponse (
@SerialName(value = "message") val message: kotlin.String? = null
)

View File

@ -23,4 +23,3 @@ data class ArrayOfArrayOfNumberOnly (
@SerialName(value = "arrayArrayNumber") val arrayArrayNumber: kotlin.Array<kotlin.Array<kotlin.Double>>? = null
)

View File

@ -23,4 +23,3 @@ data class ArrayOfNumberOnly (
@SerialName(value = "arrayNumber") val arrayNumber: kotlin.Array<kotlin.Double>? = null
)

View File

@ -28,4 +28,3 @@ data class ArrayTest (
@SerialName(value = "arrayArrayOfModel") val arrayArrayOfModel: kotlin.Array<kotlin.Array<ReadOnlyFirst>>? = null
)

View File

@ -34,4 +34,3 @@ data class Capitalization (
@SerialName(value = "ATT_NAME") val ATT_NAME: kotlin.String? = null
)

View File

@ -27,4 +27,3 @@ data class Cat (
@SerialName(value = "color") val color: kotlin.String? = null
)

View File

@ -23,4 +23,3 @@ data class CatAllOf (
@SerialName(value = "declawed") val declawed: kotlin.Boolean? = null
)

View File

@ -25,4 +25,3 @@ data class Category (
@SerialName(value = "id") val id: kotlin.Long? = null
)

View File

@ -23,4 +23,3 @@ data class ClassModel (
@SerialName(value = "propertyClass") val propertyClass: kotlin.String? = null
)

View File

@ -23,4 +23,3 @@ data class Client (
@SerialName(value = "client") val client: kotlin.String? = null
)

View File

@ -27,4 +27,3 @@ data class Dog (
@SerialName(value = "color") val color: kotlin.String? = null
)

View File

@ -23,4 +23,3 @@ data class DogAllOf (
@SerialName(value = "breed") val breed: kotlin.String? = null
)

View File

@ -24,8 +24,8 @@ data class EnumArrays (
@SerialName(value = "justSymbol") val justSymbol: EnumArrays.JustSymbol? = null,
@SerialName(value = "arrayEnum") val arrayEnum: kotlin.Array<EnumArrays.ArrayEnum>? = null
)
{
/**
*
* Values: greaterThanEqual,dollar
@ -40,9 +40,7 @@ data class EnumArrays (
object Serializer : CommonEnumSerializer<JustSymbol>("JustSymbol", values(), values().map { it.value }.toTypedArray())
}
}
{
/**
*
* Values: fish,crab
@ -57,6 +55,6 @@ data class EnumArrays (
object Serializer : CommonEnumSerializer<ArrayEnum>("ArrayEnum", values(), values().map { it.value }.toTypedArray())
}
}

View File

@ -40,8 +40,8 @@ data class EnumTest (
@SerialName(value = "outerEnumDefaultValue") val outerEnumDefaultValue: OuterEnumDefaultValue? = null,
@SerialName(value = "outerEnumIntegerDefaultValue") val outerEnumIntegerDefaultValue: OuterEnumIntegerDefaultValue? = null
)
{
/**
*
* Values: uPPER,lower,eMPTY
@ -58,9 +58,7 @@ data class EnumTest (
object Serializer : CommonEnumSerializer<EnumString>("EnumString", values(), values().map { it.value }.toTypedArray())
}
}
{
/**
*
* Values: uPPER,lower,eMPTY
@ -77,9 +75,7 @@ data class EnumTest (
object Serializer : CommonEnumSerializer<EnumStringRequired>("EnumStringRequired", values(), values().map { it.value }.toTypedArray())
}
}
{
/**
*
* Values: _1,minus1
@ -94,9 +90,7 @@ data class EnumTest (
object Serializer : CommonEnumSerializer<EnumInteger>("EnumInteger", values(), values().map { it.value }.toTypedArray())
}
}
{
/**
*
* Values: _1period1,minus1Period2
@ -111,6 +105,6 @@ data class EnumTest (
object Serializer : CommonEnumSerializer<EnumNumber>("EnumNumber", values(), values().map { it.value }.toTypedArray())
}
}

View File

@ -21,8 +21,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer
*/
@Serializable
data class FileSchemaTestClass (
@SerialName(value = "file") val file: java.io.File? = null,
@SerialName(value = "files") val files: kotlin.Array<java.io.File>? = null
@SerialName(value = "file") val file: io.ktor.client.request.forms.InputProvider? = null,
@SerialName(value = "files") val files: kotlin.Array<io.ktor.client.request.forms.InputProvider>? = null
)

View File

@ -23,4 +23,3 @@ data class Foo (
@SerialName(value = "bar") val bar: kotlin.String? = null
)

View File

@ -46,11 +46,10 @@ data class FormatTest (
@SerialName(value = "string") val string: kotlin.String? = null,
@SerialName(value = "binary") val binary: io.ktor.client.request.forms.InputProvider? = null,
@SerialName(value = "dateTime") val dateTime: kotlin.String? = null,
@SerialName(value = "uuid") val uuid: java.util.UUID? = null,
@SerialName(value = "uuid") val uuid: kotlin.String? = null,
/* A string that is a 10 digit number. Can have leading zeros. */
@SerialName(value = "patternWithDigits") val patternWithDigits: kotlin.String? = null,
/* A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. */
@SerialName(value = "patternWithDigitsAndDelimiter") val patternWithDigitsAndDelimiter: kotlin.String? = null
)

View File

@ -25,4 +25,3 @@ data class HasOnlyReadOnly (
@SerialName(value = "foo") val foo: kotlin.String? = null
)

View File

@ -23,4 +23,3 @@ data class HealthCheckResult (
@SerialName(value = "nullableMessage") val nullableMessage: kotlin.String? = null
)

View File

@ -27,4 +27,3 @@ data class InlineObject (
@SerialName(value = "status") val status: kotlin.String? = null
)

View File

@ -27,4 +27,3 @@ data class InlineObject1 (
@SerialName(value = "file") val file: io.ktor.client.request.forms.InputProvider? = null
)

View File

@ -26,8 +26,8 @@ data class InlineObject2 (
/* Form parameter enum test (string) */
@SerialName(value = "enumFormString") val enumFormString: InlineObject2.EnumFormString? = null
)
{
/**
* Form parameter enum test (string array)
* Values: greaterThan,dollar
@ -42,9 +42,7 @@ data class InlineObject2 (
object Serializer : CommonEnumSerializer<EnumFormStringArray>("EnumFormStringArray", values(), values().map { it.value }.toTypedArray())
}
}
{
/**
* Form parameter enum test (string)
* Values: abc,minusEfg,leftParenthesisXyzRightParenthesis
@ -61,6 +59,6 @@ data class InlineObject2 (
object Serializer : CommonEnumSerializer<EnumFormString>("EnumFormString", values(), values().map { it.value }.toTypedArray())
}
}

View File

@ -63,4 +63,3 @@ data class InlineObject3 (
@SerialName(value = "callback") val callback: kotlin.String? = null
)

View File

@ -27,4 +27,3 @@ data class InlineObject4 (
@SerialName(value = "param2") @Required val param2: kotlin.String
)

View File

@ -27,4 +27,3 @@ data class InlineObject5 (
@SerialName(value = "additionalMetadata") val additionalMetadata: kotlin.String? = null
)

View File

@ -24,4 +24,3 @@ data class InlineResponseDefault (
@SerialName(value = "string") val string: Foo? = null
)

View File

@ -23,4 +23,3 @@ data class List (
@SerialName(value = "&#x60;123minusList&#x60;") val ``123minusList``: kotlin.String? = null
)

View File

@ -28,8 +28,8 @@ data class MapTest (
@SerialName(value = "directMap") val directMap: kotlin.collections.Map<kotlin.String, kotlin.Boolean>? = null,
@SerialName(value = "indirectMap") val indirectMap: kotlin.collections.Map<kotlin.String, kotlin.Boolean>? = null
)
{
/**
*
* Values: uPPER,lower
@ -44,6 +44,6 @@ data class MapTest (
object Serializer : CommonEnumSerializer<MapOfEnumString>("MapOfEnumString", values(), values().map { it.value }.toTypedArray())
}
}

View File

@ -23,9 +23,8 @@ import kotlinx.serialization.internal.CommonEnumSerializer
*/
@Serializable
data class MixedPropertiesAndAdditionalPropertiesClass (
@SerialName(value = "uuid") val uuid: java.util.UUID? = null,
@SerialName(value = "uuid") val uuid: kotlin.String? = null,
@SerialName(value = "dateTime") val dateTime: kotlin.String? = null,
@SerialName(value = "map") val map: kotlin.collections.Map<kotlin.String, Animal>? = null
)

View File

@ -25,4 +25,3 @@ data class Model200Response (
@SerialName(value = "propertyClass") val propertyClass: kotlin.String? = null
)

View File

@ -29,4 +29,3 @@ data class Name (
@SerialName(value = "&#x60;123number&#x60;") val ``123number``: kotlin.Int? = null
)

View File

@ -45,4 +45,3 @@ data class NullableClass (
@SerialName(value = "objectItemsNullable") val objectItemsNullable: kotlin.collections.Map<kotlin.String, kotlin.Any>? = null
)

View File

@ -23,4 +23,3 @@ data class NumberOnly (
@SerialName(value = "justNumber") val justNumber: kotlin.Double? = null
)

View File

@ -33,8 +33,8 @@ data class Order (
@SerialName(value = "status") val status: Order.Status? = null,
@SerialName(value = "complete") val complete: kotlin.Boolean? = null
)
{
/**
* Order Status
* Values: placed,approved,delivered
@ -51,6 +51,6 @@ data class Order (
object Serializer : CommonEnumSerializer<Status>("Status", values(), values().map { it.value }.toTypedArray())
}
}

View File

@ -27,4 +27,3 @@ data class OuterComposite (
@SerialName(value = "myBoolean") val myBoolean: kotlin.Boolean? = null
)

View File

@ -35,8 +35,8 @@ data class Pet (
/* pet status in the store */
@SerialName(value = "status") val status: Pet.Status? = null
)
{
/**
* pet status in the store
* Values: available,pending,sold
@ -53,6 +53,6 @@ data class Pet (
object Serializer : CommonEnumSerializer<Status>("Status", values(), values().map { it.value }.toTypedArray())
}
}

View File

@ -25,4 +25,3 @@ data class ReadOnlyFirst (
@SerialName(value = "baz") val baz: kotlin.String? = null
)

View File

@ -23,4 +23,3 @@ data class Return (
@SerialName(value = "&#x60;return&#x60;") val ``return``: kotlin.Int? = null
)

View File

@ -23,4 +23,3 @@ data class SpecialModelname (
@SerialName(value = "dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket") val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null
)

View File

@ -25,4 +25,3 @@ data class Tag (
@SerialName(value = "name") val name: kotlin.String? = null
)

View File

@ -38,4 +38,3 @@ data class User (
@SerialName(value = "userStatus") val userStatus: kotlin.Int? = null
)