forked from loafle/openapi-generator-original
[kotlin] fix Date types usages (#8594)
* [kotlin] fix Date types usages
This commit is contained in:
parent
b78d4fce6a
commit
45fc02350b
@ -32,8 +32,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| Type/Alias | Imports |
|
||||
| ---------- | ------- |
|
||||
|BigDecimal|java.math.BigDecimal|
|
||||
|Date|java.util.Date|
|
||||
|DateTime|java.time.LocalDateTime|
|
||||
|Date|java.time.LocalDate|
|
||||
|DateTime|java.time.OffsetDateTime|
|
||||
|File|java.io.File|
|
||||
|LocalDate|java.time.LocalDate|
|
||||
|LocalDateTime|java.time.LocalDateTime|
|
||||
|
@ -26,8 +26,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| Type/Alias | Imports |
|
||||
| ---------- | ------- |
|
||||
|BigDecimal|java.math.BigDecimal|
|
||||
|Date|java.util.Date|
|
||||
|DateTime|java.time.LocalDateTime|
|
||||
|Date|java.time.LocalDate|
|
||||
|DateTime|java.time.OffsetDateTime|
|
||||
|File|java.io.File|
|
||||
|LocalDate|java.time.LocalDate|
|
||||
|LocalDateTime|java.time.LocalDateTime|
|
||||
|
@ -34,8 +34,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| Type/Alias | Imports |
|
||||
| ---------- | ------- |
|
||||
|BigDecimal|java.math.BigDecimal|
|
||||
|Date|java.util.Date|
|
||||
|DateTime|java.time.LocalDateTime|
|
||||
|Date|java.time.LocalDate|
|
||||
|DateTime|java.time.OffsetDateTime|
|
||||
|File|java.io.File|
|
||||
|LocalDate|java.time.LocalDate|
|
||||
|LocalDateTime|java.time.LocalDateTime|
|
||||
|
@ -27,8 +27,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| Type/Alias | Imports |
|
||||
| ---------- | ------- |
|
||||
|BigDecimal|java.math.BigDecimal|
|
||||
|Date|java.util.Date|
|
||||
|DateTime|java.time.LocalDateTime|
|
||||
|Date|java.time.LocalDate|
|
||||
|DateTime|java.time.OffsetDateTime|
|
||||
|File|java.io.File|
|
||||
|LocalDate|java.time.LocalDate|
|
||||
|LocalDateTime|java.time.LocalDateTime|
|
||||
|
@ -153,7 +153,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
typeMapping.put("ByteArray", "kotlin.ByteArray");
|
||||
typeMapping.put("number", "java.math.BigDecimal");
|
||||
typeMapping.put("decimal", "java.math.BigDecimal");
|
||||
typeMapping.put("date-time", "java.time.LocalDateTime");
|
||||
typeMapping.put("date-time", "java.time.OffsetDateTime");
|
||||
typeMapping.put("date", "java.time.LocalDate");
|
||||
typeMapping.put("file", "java.io.File");
|
||||
typeMapping.put("array", "kotlin.Array");
|
||||
@ -163,7 +163,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
typeMapping.put("object", "kotlin.Any");
|
||||
typeMapping.put("binary", "kotlin.ByteArray");
|
||||
typeMapping.put("Date", "java.time.LocalDate");
|
||||
typeMapping.put("DateTime", "java.time.LocalDateTime");
|
||||
typeMapping.put("DateTime", "java.time.OffsetDateTime");
|
||||
|
||||
instantiationTypes.put("array", "kotlin.collections.ArrayList");
|
||||
instantiationTypes.put("list", "kotlin.collections.ArrayList");
|
||||
@ -174,9 +174,9 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
||||
importMapping.put("UUID", "java.util.UUID");
|
||||
importMapping.put("URI", "java.net.URI");
|
||||
importMapping.put("File", "java.io.File");
|
||||
importMapping.put("Date", "java.util.Date");
|
||||
importMapping.put("Date", "java.time.LocalDate");
|
||||
importMapping.put("Timestamp", "java.sql.Timestamp");
|
||||
importMapping.put("DateTime", "java.time.LocalDateTime");
|
||||
importMapping.put("DateTime", "java.time.OffsetDateTime");
|
||||
importMapping.put("LocalDateTime", "java.time.LocalDateTime");
|
||||
importMapping.put("LocalDate", "java.time.LocalDate");
|
||||
importMapping.put("LocalTime", "java.time.LocalTime");
|
||||
|
@ -125,17 +125,9 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
||||
typeMapping.put("array", "kotlin.collections.List");
|
||||
typeMapping.put("list", "kotlin.collections.List");
|
||||
|
||||
typeMapping.put("date", "java.time.LocalDate");
|
||||
typeMapping.put("date-time", "java.time.OffsetDateTime");
|
||||
typeMapping.put("Date", "java.time.LocalDate");
|
||||
typeMapping.put("DateTime", "java.time.OffsetDateTime");
|
||||
|
||||
// use resource for file handling
|
||||
typeMapping.put("file", "org.springframework.core.io.Resource");
|
||||
|
||||
importMapping.put("Date", "java.time.LocalDate");
|
||||
importMapping.put("DateTime", "java.time.OffsetDateTime");
|
||||
|
||||
addOption(TITLE, "server title name or client service name", title);
|
||||
addOption(BASE_PACKAGE, "base package (invokerPackage) for generated code", basePackage);
|
||||
addOption(SERVER_PORT, "configuration the port in which the sever is to run on", serverPort);
|
||||
|
@ -2,7 +2,6 @@ package {{packageName}}.infrastructure
|
||||
|
||||
{{#moshi}}
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
{{^moshiCodeGen}}
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
{{/moshiCodeGen}}
|
||||
@ -36,7 +35,6 @@ import java.util.Date
|
||||
{{#moshi}}
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
@ -54,7 +52,6 @@ import java.util.Date
|
||||
{{#gson}}
|
||||
@JvmStatic
|
||||
val gsonBuilder: GsonBuilder = GsonBuilder()
|
||||
.registerTypeAdapter(Date::class.java, DateAdapter())
|
||||
.registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDate::class.java, LocalDateAdapter())
|
||||
|
@ -11,7 +11,6 @@ import java.util.Date
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val gsonBuilder: GsonBuilder = GsonBuilder()
|
||||
.registerTypeAdapter(Date::class.java, DateAdapter())
|
||||
.registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDate::class.java, LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -11,7 +11,6 @@ import java.util.Date
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val gsonBuilder: GsonBuilder = GsonBuilder()
|
||||
.registerTypeAdapter(Date::class.java, DateAdapter())
|
||||
.registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDate::class.java, LocalDateAdapter())
|
||||
|
@ -1,13 +1,11 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
internal object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
5.0.1-SNAPSHOT
|
@ -33,6 +33,5 @@ dependencies {
|
||||
compile "com.squareup.moshi:moshi-kotlin:1.9.2"
|
||||
compile "com.squareup.moshi:moshi-adapters:1.9.2"
|
||||
compile "com.squareup.okhttp3:okhttp:4.2.2"
|
||||
compile "com.squareup.okhttp3:logging-interceptor:4.4.0"
|
||||
testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0"
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ val Response.isInformational : Boolean get() = this.code in 100..199
|
||||
/**
|
||||
* Provides an extension to evaluation whether the response is a 3xx code
|
||||
*/
|
||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
|
||||
val Response.isRedirect : Boolean get() = this.code in 300..399
|
||||
|
||||
/**
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -1,14 +1,12 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import java.util.Date
|
||||
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val moshiBuilder: Moshi.Builder = Moshi.Builder()
|
||||
.add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe())
|
||||
.add(OffsetDateTimeAdapter())
|
||||
.add(LocalDateTimeAdapter())
|
||||
.add(LocalDateAdapter())
|
||||
|
@ -27,12 +27,6 @@ docs/Foo.md
|
||||
docs/FormatTest.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineObject.md
|
||||
docs/InlineObject1.md
|
||||
docs/InlineObject2.md
|
||||
docs/InlineObject3.md
|
||||
docs/InlineObject4.md
|
||||
docs/InlineObject5.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/List.md
|
||||
docs/MapTest.md
|
||||
@ -100,12 +94,6 @@ src/main/kotlin/org/openapitools/client/models/Foo.kt
|
||||
src/main/kotlin/org/openapitools/client/models/FormatTest.kt
|
||||
src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt
|
||||
src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject1.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject2.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject3.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject4.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject5.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt
|
||||
src/main/kotlin/org/openapitools/client/models/List.kt
|
||||
src/main/kotlin/org/openapitools/client/models/MapTest.kt
|
||||
|
@ -1 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
5.0.1-SNAPSHOT
|
@ -101,12 +101,6 @@ Class | Method | HTTP request | Description
|
||||
- [org.openapitools.client.models.FormatTest](docs/FormatTest.md)
|
||||
- [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [org.openapitools.client.models.InlineObject](docs/InlineObject.md)
|
||||
- [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md)
|
||||
- [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md)
|
||||
- [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md)
|
||||
- [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md)
|
||||
- [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md)
|
||||
- [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [org.openapitools.client.models.List](docs/List.md)
|
||||
- [org.openapitools.client.models.MapTest](docs/MapTest.md)
|
||||
|
@ -30,8 +30,9 @@ test {
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0"
|
||||
compile "com.google.code.gson:gson:2.8.6"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0"
|
||||
compile "com.squareup.okhttp3:logging-interceptor:4.4.0"
|
||||
compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
|
||||
compile "com.squareup.retrofit2:converter-gson:$retrofitVersion"
|
||||
compile "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
|
||||
|
@ -460,13 +460,13 @@ To test enum parameters
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(FakeApi::class.java)
|
||||
val enumHeaderStringArray : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Header parameter enum test (string array)
|
||||
val enumHeaderStringArray : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Header parameter enum test (string array)
|
||||
val enumHeaderString : kotlin.String = enumHeaderString_example // kotlin.String | Header parameter enum test (string)
|
||||
val enumQueryStringArray : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Query parameter enum test (string array)
|
||||
val enumQueryStringArray : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Query parameter enum test (string array)
|
||||
val enumQueryString : kotlin.String = enumQueryString_example // kotlin.String | Query parameter enum test (string)
|
||||
val enumQueryInteger : kotlin.Int = 56 // kotlin.Int | Query parameter enum test (double)
|
||||
val enumQueryDouble : kotlin.Double = 1.2 // kotlin.Double | Query parameter enum test (double)
|
||||
val enumFormStringArray : kotlin.Array<kotlin.String> = enumFormStringArray_example // kotlin.Array<kotlin.String> | Form parameter enum test (string array)
|
||||
val enumFormStringArray : kotlin.collections.List<kotlin.String> = enumFormStringArray_example // kotlin.collections.List<kotlin.String> | Form parameter enum test (string array)
|
||||
val enumFormString : kotlin.String = enumFormString_example // kotlin.String | Form parameter enum test (string)
|
||||
|
||||
launch(Dispatchers.IO) {
|
||||
@ -478,14 +478,14 @@ launch(Dispatchers.IO) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2]
|
||||
**enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
|
||||
**enumFormStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -645,11 +645,11 @@ To test the collection format in query parameters
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(FakeApi::class.java)
|
||||
val pipe : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val ioutil : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val http : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val url : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val context : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val pipe : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val ioutil : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val http : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val url : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val context : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
|
||||
launch(Dispatchers.IO) {
|
||||
webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
@ -660,11 +660,11 @@ launch(Dispatchers.IO) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pipe** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**ioutil** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**http** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**url** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**context** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**pipe** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**ioutil** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**http** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**url** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**context** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **kotlin.Long** | | [optional]
|
||||
**float** | **kotlin.Float** | | [optional]
|
||||
**double** | **kotlin.Double** | | [optional]
|
||||
**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||
**string** | **kotlin.String** | | [optional]
|
||||
**binary** | [**java.io.File**](java.io.File.md) | | [optional]
|
||||
**dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**`123minusList`** | **kotlin.String** | | [optional]
|
||||
**`123list`** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -107,10 +107,10 @@ Multiple status values can be provided with comma separated strings
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(PetApi::class.java)
|
||||
val status : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Status values that need to be considered for filter
|
||||
val status : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Status values that need to be considered for filter
|
||||
|
||||
launch(Dispatchers.IO) {
|
||||
val result : kotlin.Array<Pet> = webService.findPetsByStatus(status)
|
||||
val result : kotlin.collections.List<Pet> = webService.findPetsByStatus(status)
|
||||
}
|
||||
```
|
||||
|
||||
@ -118,11 +118,11 @@ launch(Dispatchers.IO) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
**status** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
[**kotlin.Array<Pet>**](Pet.md)
|
||||
[**kotlin.collections.List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -147,10 +147,10 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(PetApi::class.java)
|
||||
val tags : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Tags to filter by
|
||||
val tags : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Tags to filter by
|
||||
|
||||
launch(Dispatchers.IO) {
|
||||
val result : kotlin.Array<Pet> = webService.findPetsByTags(tags)
|
||||
val result : kotlin.collections.List<Pet> = webService.findPetsByTags(tags)
|
||||
}
|
||||
```
|
||||
|
||||
@ -158,11 +158,11 @@ launch(Dispatchers.IO) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by |
|
||||
**tags** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**kotlin.Array<Pet>**](Pet.md)
|
||||
[**kotlin.collections.List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional]
|
||||
**dollarSpecialPropertyName** | **kotlin.Long** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ Creates list of users with given input array
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(UserApi::class.java)
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
val user : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
|
||||
launch(Dispatchers.IO) {
|
||||
webService.createUsersWithArrayInput(user)
|
||||
@ -77,7 +77,7 @@ launch(Dispatchers.IO) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
**user** | [**kotlin.collections.List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -104,7 +104,7 @@ Creates list of users with given input array
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(UserApi::class.java)
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
val user : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
|
||||
launch(Dispatchers.IO) {
|
||||
webService.createUsersWithListInput(user)
|
||||
@ -115,7 +115,7 @@ launch(Dispatchers.IO) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
**user** | [**kotlin.collections.List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -12,6 +12,8 @@ import org.openapitools.client.models.OuterComposite
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
import okhttp3.MultipartBody
|
||||
|
||||
interface FakeApi {
|
||||
/**
|
||||
* Health check endpoint
|
||||
@ -36,7 +38,7 @@ interface FakeApi {
|
||||
* @return [Unit]
|
||||
*/
|
||||
@GET("fake/http-signature-test")
|
||||
suspend fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String, @Header("header_1") header1: kotlin.String): Response<Unit>
|
||||
suspend fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String? = null, @Header("header_1") header1: kotlin.String): Response<Unit>
|
||||
|
||||
/**
|
||||
*
|
||||
@ -158,18 +160,18 @@ interface FakeApi {
|
||||
* - 404: Not found
|
||||
*
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$")
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @return [Unit]
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@GET("fake")
|
||||
suspend fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.Array<kotlin.String>, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.Array<kotlin.String>, @Query("enum_query_string") enumQueryString: kotlin.String, @Query("enum_query_integer") enumQueryInteger: kotlin.Int, @Query("enum_query_double") enumQueryDouble: kotlin.Double, @Field("enum_form_string_array") enumFormStringArray: kotlin.Array<kotlin.String>, @Field("enum_form_string") enumFormString: kotlin.String): Response<Unit>
|
||||
suspend fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.collections.List<kotlin.String>, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.collections.List<kotlin.String>? = null, @Query("enum_query_string") enumQueryString: kotlin.String? = null, @Query("enum_query_integer") enumQueryInteger: kotlin.Int? = null, @Query("enum_query_double") enumQueryDouble: kotlin.Double? = null, @Field("enum_form_string_array") enumFormStringArray: kotlin.collections.List<kotlin.String>, @Field("enum_form_string") enumFormString: kotlin.String): Response<Unit>
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
@ -186,7 +188,7 @@ interface FakeApi {
|
||||
* @return [Unit]
|
||||
*/
|
||||
@DELETE("fake")
|
||||
suspend fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long): Response<Unit>
|
||||
suspend fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int? = null, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long? = null): Response<Unit>
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
@ -228,6 +230,6 @@ interface FakeApi {
|
||||
* @return [Unit]
|
||||
*/
|
||||
@PUT("fake/test-query-paramters")
|
||||
suspend fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.Array<kotlin.String>, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.Array<kotlin.String>): Response<Unit>
|
||||
suspend fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.collections.List<kotlin.String>, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.collections.List<kotlin.String>): Response<Unit>
|
||||
|
||||
}
|
||||
|
@ -8,11 +8,14 @@ import okhttp3.RequestBody
|
||||
import org.openapitools.client.models.ApiResponse
|
||||
import org.openapitools.client.models.Pet
|
||||
|
||||
import okhttp3.MultipartBody
|
||||
|
||||
interface PetApi {
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 405: Invalid input
|
||||
*
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
@ -25,6 +28,7 @@ interface PetApi {
|
||||
* Deletes a pet
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 400: Invalid pet value
|
||||
*
|
||||
* @param petId Pet id to delete
|
||||
@ -42,10 +46,10 @@ interface PetApi {
|
||||
* - 400: Invalid status value
|
||||
*
|
||||
* @param status Status values that need to be considered for filter
|
||||
* @return [kotlin.Array<Pet>]
|
||||
* @return [kotlin.collections.List<Pet>]
|
||||
*/
|
||||
@GET("pet/findByStatus")
|
||||
suspend fun findPetsByStatus(@Query("status") status: CSVParams): Response<kotlin.Array<Pet>>
|
||||
suspend fun findPetsByStatus(@Query("status") status: CSVParams): Response<kotlin.collections.List<Pet>>
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
@ -55,11 +59,11 @@ interface PetApi {
|
||||
* - 400: Invalid tag value
|
||||
*
|
||||
* @param tags Tags to filter by
|
||||
* @return [kotlin.Array<Pet>]
|
||||
* @return [kotlin.collections.List<Pet>]
|
||||
*/
|
||||
@Deprecated("This api was deprecated")
|
||||
@GET("pet/findByTags")
|
||||
suspend fun findPetsByTags(@Query("tags") tags: CSVParams): Response<kotlin.Array<Pet>>
|
||||
suspend fun findPetsByTags(@Query("tags") tags: CSVParams): Response<kotlin.collections.List<Pet>>
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
@ -79,6 +83,7 @@ interface PetApi {
|
||||
* Update an existing pet
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 400: Invalid ID supplied
|
||||
* - 404: Pet not found
|
||||
* - 405: Validation exception
|
||||
@ -93,6 +98,7 @@ interface PetApi {
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 405: Invalid input
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated
|
||||
|
@ -30,7 +30,7 @@ interface UserApi {
|
||||
* @return [Unit]
|
||||
*/
|
||||
@POST("user/createWithArray")
|
||||
suspend fun createUsersWithArrayInput(@Body user: kotlin.Array<User>): Response<Unit>
|
||||
suspend fun createUsersWithArrayInput(@Body user: kotlin.collections.List<User>): Response<Unit>
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -42,7 +42,7 @@ interface UserApi {
|
||||
* @return [Unit]
|
||||
*/
|
||||
@POST("user/createWithList")
|
||||
suspend fun createUsersWithListInput(@Body user: kotlin.Array<User>): Response<Unit>
|
||||
suspend fun createUsersWithListInput(@Body user: kotlin.collections.List<User>): Response<Unit>
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
|
@ -21,7 +21,8 @@ import retrofit2.converter.gson.GsonConverterFactory
|
||||
class ApiClient(
|
||||
private var baseUrl: String = defaultBasePath,
|
||||
private val okHttpClientBuilder: OkHttpClient.Builder? = null,
|
||||
private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder
|
||||
private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder,
|
||||
private val okHttpClient : OkHttpClient? = null
|
||||
) {
|
||||
private val apiAuthorizations = mutableMapOf<String, Interceptor>()
|
||||
var logger: ((String) -> Unit)? = null
|
||||
@ -224,7 +225,8 @@ class ApiClient(
|
||||
}
|
||||
|
||||
fun <S> createService(serviceClass: Class<S>): S {
|
||||
return retrofitBuilder.client(clientBuilder.build()).build().create(serviceClass)
|
||||
val usedClient = this.okHttpClient ?: clientBuilder.build()
|
||||
return retrofitBuilder.client(usedClient).build().create(serviceClass)
|
||||
}
|
||||
|
||||
private fun normalizeBaseUrl() {
|
||||
|
@ -11,7 +11,6 @@ import java.util.Date
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val gsonBuilder: GsonBuilder = GsonBuilder()
|
||||
.registerTypeAdapter(Date::class.java, DateAdapter())
|
||||
.registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDate::class.java, LocalDateAdapter())
|
||||
|
@ -26,6 +26,7 @@ import java.io.Serializable
|
||||
* @param int64
|
||||
* @param float
|
||||
* @param double
|
||||
* @param decimal
|
||||
* @param string
|
||||
* @param binary
|
||||
* @param dateTime
|
||||
@ -53,6 +54,8 @@ data class FormatTest (
|
||||
val float: kotlin.Float? = null,
|
||||
@SerializedName("double")
|
||||
val double: kotlin.Double? = null,
|
||||
@SerializedName("decimal")
|
||||
val decimal: java.math.BigDecimal? = null,
|
||||
@SerializedName("string")
|
||||
val string: kotlin.String? = null,
|
||||
@SerializedName("binary")
|
||||
|
@ -17,12 +17,12 @@ import java.io.Serializable
|
||||
|
||||
/**
|
||||
*
|
||||
* @param `123minusList`
|
||||
* @param `123list`
|
||||
*/
|
||||
|
||||
data class List (
|
||||
@SerializedName("123-list")
|
||||
val `123minusList`: kotlin.String? = null
|
||||
val `123list`: kotlin.String? = null
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
@ -17,12 +17,12 @@ import java.io.Serializable
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket
|
||||
* @param dollarSpecialPropertyName
|
||||
*/
|
||||
|
||||
data class SpecialModelname (
|
||||
@SerializedName("\$special[property.name]")
|
||||
val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null
|
||||
val dollarSpecialPropertyName: kotlin.Long? = null
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
@ -27,12 +27,6 @@ docs/Foo.md
|
||||
docs/FormatTest.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineObject.md
|
||||
docs/InlineObject1.md
|
||||
docs/InlineObject2.md
|
||||
docs/InlineObject3.md
|
||||
docs/InlineObject4.md
|
||||
docs/InlineObject5.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/List.md
|
||||
docs/MapTest.md
|
||||
@ -100,12 +94,6 @@ src/main/kotlin/org/openapitools/client/models/Foo.kt
|
||||
src/main/kotlin/org/openapitools/client/models/FormatTest.kt
|
||||
src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt
|
||||
src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject1.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject2.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject3.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject4.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject5.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt
|
||||
src/main/kotlin/org/openapitools/client/models/List.kt
|
||||
src/main/kotlin/org/openapitools/client/models/MapTest.kt
|
||||
|
@ -1 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
5.0.1-SNAPSHOT
|
@ -101,12 +101,6 @@ Class | Method | HTTP request | Description
|
||||
- [org.openapitools.client.models.FormatTest](docs/FormatTest.md)
|
||||
- [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [org.openapitools.client.models.InlineObject](docs/InlineObject.md)
|
||||
- [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md)
|
||||
- [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md)
|
||||
- [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md)
|
||||
- [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md)
|
||||
- [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md)
|
||||
- [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [org.openapitools.client.models.List](docs/List.md)
|
||||
- [org.openapitools.client.models.MapTest](docs/MapTest.md)
|
||||
|
@ -31,8 +31,9 @@ test {
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0"
|
||||
compile "com.google.code.gson:gson:2.8.6"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0"
|
||||
compile "com.squareup.okhttp3:logging-interceptor:4.4.0"
|
||||
compile "io.reactivex:rxjava:$rxJavaVersion"
|
||||
compile "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion"
|
||||
compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
|
||||
|
@ -440,13 +440,13 @@ To test enum parameters
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(FakeApi::class.java)
|
||||
val enumHeaderStringArray : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Header parameter enum test (string array)
|
||||
val enumHeaderStringArray : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Header parameter enum test (string array)
|
||||
val enumHeaderString : kotlin.String = enumHeaderString_example // kotlin.String | Header parameter enum test (string)
|
||||
val enumQueryStringArray : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Query parameter enum test (string array)
|
||||
val enumQueryStringArray : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Query parameter enum test (string array)
|
||||
val enumQueryString : kotlin.String = enumQueryString_example // kotlin.String | Query parameter enum test (string)
|
||||
val enumQueryInteger : kotlin.Int = 56 // kotlin.Int | Query parameter enum test (double)
|
||||
val enumQueryDouble : kotlin.Double = 1.2 // kotlin.Double | Query parameter enum test (double)
|
||||
val enumFormStringArray : kotlin.Array<kotlin.String> = enumFormStringArray_example // kotlin.Array<kotlin.String> | Form parameter enum test (string array)
|
||||
val enumFormStringArray : kotlin.collections.List<kotlin.String> = enumFormStringArray_example // kotlin.collections.List<kotlin.String> | Form parameter enum test (string array)
|
||||
val enumFormString : kotlin.String = enumFormString_example // kotlin.String | Form parameter enum test (string)
|
||||
|
||||
webService.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
|
||||
@ -456,14 +456,14 @@ webService.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQuery
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2]
|
||||
**enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
|
||||
**enumFormStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -617,11 +617,11 @@ To test the collection format in query parameters
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(FakeApi::class.java)
|
||||
val pipe : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val ioutil : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val http : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val url : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val context : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val pipe : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val ioutil : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val http : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val url : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val context : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
|
||||
webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
```
|
||||
@ -630,11 +630,11 @@ webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pipe** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**ioutil** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**http** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**url** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**context** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**pipe** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**ioutil** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**http** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**url** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**context** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **kotlin.Long** | | [optional]
|
||||
**float** | **kotlin.Float** | | [optional]
|
||||
**double** | **kotlin.Double** | | [optional]
|
||||
**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||
**string** | **kotlin.String** | | [optional]
|
||||
**binary** | [**java.io.File**](java.io.File.md) | | [optional]
|
||||
**dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**`123minusList`** | **kotlin.String** | | [optional]
|
||||
**`123list`** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -103,20 +103,20 @@ Multiple status values can be provided with comma separated strings
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(PetApi::class.java)
|
||||
val status : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Status values that need to be considered for filter
|
||||
val status : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Status values that need to be considered for filter
|
||||
|
||||
val result : kotlin.Array<Pet> = webService.findPetsByStatus(status)
|
||||
val result : kotlin.collections.List<Pet> = webService.findPetsByStatus(status)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
**status** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
[**kotlin.Array<Pet>**](Pet.md)
|
||||
[**kotlin.collections.List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -141,20 +141,20 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(PetApi::class.java)
|
||||
val tags : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Tags to filter by
|
||||
val tags : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Tags to filter by
|
||||
|
||||
val result : kotlin.Array<Pet> = webService.findPetsByTags(tags)
|
||||
val result : kotlin.collections.List<Pet> = webService.findPetsByTags(tags)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by |
|
||||
**tags** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**kotlin.Array<Pet>**](Pet.md)
|
||||
[**kotlin.collections.List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional]
|
||||
**dollarSpecialPropertyName** | **kotlin.Long** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ Creates list of users with given input array
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(UserApi::class.java)
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
val user : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
|
||||
webService.createUsersWithArrayInput(user)
|
||||
```
|
||||
@ -73,7 +73,7 @@ webService.createUsersWithArrayInput(user)
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
**user** | [**kotlin.collections.List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -100,7 +100,7 @@ Creates list of users with given input array
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(UserApi::class.java)
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
val user : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
|
||||
webService.createUsersWithListInput(user)
|
||||
```
|
||||
@ -109,7 +109,7 @@ webService.createUsersWithListInput(user)
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
**user** | [**kotlin.collections.List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -12,6 +12,8 @@ import org.openapitools.client.models.OuterComposite
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
import okhttp3.MultipartBody
|
||||
|
||||
interface FakeApi {
|
||||
/**
|
||||
* Health check endpoint
|
||||
@ -36,7 +38,7 @@ interface FakeApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@GET("fake/http-signature-test")
|
||||
fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String, @Header("header_1") header1: kotlin.String): Observable<Unit>
|
||||
fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String? = null, @Header("header_1") header1: kotlin.String): Observable<Unit>
|
||||
|
||||
/**
|
||||
*
|
||||
@ -158,18 +160,18 @@ interface FakeApi {
|
||||
* - 404: Not found
|
||||
*
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$")
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@GET("fake")
|
||||
fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.Array<kotlin.String>, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.Array<kotlin.String>, @Query("enum_query_string") enumQueryString: kotlin.String, @Query("enum_query_integer") enumQueryInteger: kotlin.Int, @Query("enum_query_double") enumQueryDouble: kotlin.Double, @Field("enum_form_string_array") enumFormStringArray: kotlin.Array<kotlin.String>, @Field("enum_form_string") enumFormString: kotlin.String): Observable<Unit>
|
||||
fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.collections.List<kotlin.String>, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.collections.List<kotlin.String>? = null, @Query("enum_query_string") enumQueryString: kotlin.String? = null, @Query("enum_query_integer") enumQueryInteger: kotlin.Int? = null, @Query("enum_query_double") enumQueryDouble: kotlin.Double? = null, @Field("enum_form_string_array") enumFormStringArray: kotlin.collections.List<kotlin.String>, @Field("enum_form_string") enumFormString: kotlin.String): Observable<Unit>
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
@ -186,7 +188,7 @@ interface FakeApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@DELETE("fake")
|
||||
fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long): Observable<Unit>
|
||||
fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int? = null, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long? = null): Observable<Unit>
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
@ -228,6 +230,6 @@ interface FakeApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@PUT("fake/test-query-paramters")
|
||||
fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.Array<kotlin.String>, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.Array<kotlin.String>): Observable<Unit>
|
||||
fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.collections.List<kotlin.String>, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.collections.List<kotlin.String>): Observable<Unit>
|
||||
|
||||
}
|
||||
|
@ -8,11 +8,14 @@ import rx.Observable
|
||||
import org.openapitools.client.models.ApiResponse
|
||||
import org.openapitools.client.models.Pet
|
||||
|
||||
import okhttp3.MultipartBody
|
||||
|
||||
interface PetApi {
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 405: Invalid input
|
||||
*
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
@ -25,6 +28,7 @@ interface PetApi {
|
||||
* Deletes a pet
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 400: Invalid pet value
|
||||
*
|
||||
* @param petId Pet id to delete
|
||||
@ -42,10 +46,10 @@ interface PetApi {
|
||||
* - 400: Invalid status value
|
||||
*
|
||||
* @param status Status values that need to be considered for filter
|
||||
* @return [Call]<[kotlin.Array<Pet>]>
|
||||
* @return [Call]<[kotlin.collections.List<Pet>]>
|
||||
*/
|
||||
@GET("pet/findByStatus")
|
||||
fun findPetsByStatus(@Query("status") status: CSVParams): Observable<kotlin.Array<Pet>>
|
||||
fun findPetsByStatus(@Query("status") status: CSVParams): Observable<kotlin.collections.List<Pet>>
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
@ -55,11 +59,11 @@ interface PetApi {
|
||||
* - 400: Invalid tag value
|
||||
*
|
||||
* @param tags Tags to filter by
|
||||
* @return [Call]<[kotlin.Array<Pet>]>
|
||||
* @return [Call]<[kotlin.collections.List<Pet>]>
|
||||
*/
|
||||
@Deprecated("This api was deprecated")
|
||||
@GET("pet/findByTags")
|
||||
fun findPetsByTags(@Query("tags") tags: CSVParams): Observable<kotlin.Array<Pet>>
|
||||
fun findPetsByTags(@Query("tags") tags: CSVParams): Observable<kotlin.collections.List<Pet>>
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
@ -79,6 +83,7 @@ interface PetApi {
|
||||
* Update an existing pet
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 400: Invalid ID supplied
|
||||
* - 404: Pet not found
|
||||
* - 405: Validation exception
|
||||
@ -93,6 +98,7 @@ interface PetApi {
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 405: Invalid input
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated
|
||||
|
@ -30,7 +30,7 @@ interface UserApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@POST("user/createWithArray")
|
||||
fun createUsersWithArrayInput(@Body user: kotlin.Array<User>): Observable<Unit>
|
||||
fun createUsersWithArrayInput(@Body user: kotlin.collections.List<User>): Observable<Unit>
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -42,7 +42,7 @@ interface UserApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@POST("user/createWithList")
|
||||
fun createUsersWithListInput(@Body user: kotlin.Array<User>): Observable<Unit>
|
||||
fun createUsersWithListInput(@Body user: kotlin.collections.List<User>): Observable<Unit>
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
|
@ -22,7 +22,8 @@ import retrofit2.converter.gson.GsonConverterFactory
|
||||
class ApiClient(
|
||||
private var baseUrl: String = defaultBasePath,
|
||||
private val okHttpClientBuilder: OkHttpClient.Builder? = null,
|
||||
private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder
|
||||
private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder,
|
||||
private val okHttpClient : OkHttpClient? = null
|
||||
) {
|
||||
private val apiAuthorizations = mutableMapOf<String, Interceptor>()
|
||||
var logger: ((String) -> Unit)? = null
|
||||
@ -226,7 +227,8 @@ class ApiClient(
|
||||
}
|
||||
|
||||
fun <S> createService(serviceClass: Class<S>): S {
|
||||
return retrofitBuilder.client(clientBuilder.build()).build().create(serviceClass)
|
||||
val usedClient = this.okHttpClient ?: clientBuilder.build()
|
||||
return retrofitBuilder.client(usedClient).build().create(serviceClass)
|
||||
}
|
||||
|
||||
private fun normalizeBaseUrl() {
|
||||
|
@ -11,7 +11,6 @@ import java.util.Date
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val gsonBuilder: GsonBuilder = GsonBuilder()
|
||||
.registerTypeAdapter(Date::class.java, DateAdapter())
|
||||
.registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDate::class.java, LocalDateAdapter())
|
||||
|
@ -26,6 +26,7 @@ import java.io.Serializable
|
||||
* @param int64
|
||||
* @param float
|
||||
* @param double
|
||||
* @param decimal
|
||||
* @param string
|
||||
* @param binary
|
||||
* @param dateTime
|
||||
@ -53,6 +54,8 @@ data class FormatTest (
|
||||
val float: kotlin.Float? = null,
|
||||
@SerializedName("double")
|
||||
val double: kotlin.Double? = null,
|
||||
@SerializedName("decimal")
|
||||
val decimal: java.math.BigDecimal? = null,
|
||||
@SerializedName("string")
|
||||
val string: kotlin.String? = null,
|
||||
@SerializedName("binary")
|
||||
|
@ -17,12 +17,12 @@ import java.io.Serializable
|
||||
|
||||
/**
|
||||
*
|
||||
* @param `123minusList`
|
||||
* @param `123list`
|
||||
*/
|
||||
|
||||
data class List (
|
||||
@SerializedName("123-list")
|
||||
val `123minusList`: kotlin.String? = null
|
||||
val `123list`: kotlin.String? = null
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
@ -17,12 +17,12 @@ import java.io.Serializable
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket
|
||||
* @param dollarSpecialPropertyName
|
||||
*/
|
||||
|
||||
data class SpecialModelname (
|
||||
@SerializedName("\$special[property.name]")
|
||||
val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null
|
||||
val dollarSpecialPropertyName: kotlin.Long? = null
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
@ -27,12 +27,6 @@ docs/Foo.md
|
||||
docs/FormatTest.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineObject.md
|
||||
docs/InlineObject1.md
|
||||
docs/InlineObject2.md
|
||||
docs/InlineObject3.md
|
||||
docs/InlineObject4.md
|
||||
docs/InlineObject5.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/List.md
|
||||
docs/MapTest.md
|
||||
@ -100,12 +94,6 @@ src/main/kotlin/org/openapitools/client/models/Foo.kt
|
||||
src/main/kotlin/org/openapitools/client/models/FormatTest.kt
|
||||
src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt
|
||||
src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject1.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject2.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject3.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject4.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject5.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt
|
||||
src/main/kotlin/org/openapitools/client/models/List.kt
|
||||
src/main/kotlin/org/openapitools/client/models/MapTest.kt
|
||||
|
@ -1 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
5.0.1-SNAPSHOT
|
@ -101,12 +101,6 @@ Class | Method | HTTP request | Description
|
||||
- [org.openapitools.client.models.FormatTest](docs/FormatTest.md)
|
||||
- [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [org.openapitools.client.models.InlineObject](docs/InlineObject.md)
|
||||
- [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md)
|
||||
- [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md)
|
||||
- [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md)
|
||||
- [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md)
|
||||
- [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md)
|
||||
- [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [org.openapitools.client.models.List](docs/List.md)
|
||||
- [org.openapitools.client.models.MapTest](docs/MapTest.md)
|
||||
|
@ -31,8 +31,9 @@ test {
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0"
|
||||
compile "com.google.code.gson:gson:2.8.6"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0"
|
||||
compile "com.squareup.okhttp3:logging-interceptor:4.4.0"
|
||||
compile "io.reactivex.rxjava2:rxjava:$rxJava2Version"
|
||||
compile "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
|
||||
compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
|
||||
|
@ -440,13 +440,13 @@ To test enum parameters
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(FakeApi::class.java)
|
||||
val enumHeaderStringArray : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Header parameter enum test (string array)
|
||||
val enumHeaderStringArray : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Header parameter enum test (string array)
|
||||
val enumHeaderString : kotlin.String = enumHeaderString_example // kotlin.String | Header parameter enum test (string)
|
||||
val enumQueryStringArray : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Query parameter enum test (string array)
|
||||
val enumQueryStringArray : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Query parameter enum test (string array)
|
||||
val enumQueryString : kotlin.String = enumQueryString_example // kotlin.String | Query parameter enum test (string)
|
||||
val enumQueryInteger : kotlin.Int = 56 // kotlin.Int | Query parameter enum test (double)
|
||||
val enumQueryDouble : kotlin.Double = 1.2 // kotlin.Double | Query parameter enum test (double)
|
||||
val enumFormStringArray : kotlin.Array<kotlin.String> = enumFormStringArray_example // kotlin.Array<kotlin.String> | Form parameter enum test (string array)
|
||||
val enumFormStringArray : kotlin.collections.List<kotlin.String> = enumFormStringArray_example // kotlin.collections.List<kotlin.String> | Form parameter enum test (string array)
|
||||
val enumFormString : kotlin.String = enumFormString_example // kotlin.String | Form parameter enum test (string)
|
||||
|
||||
webService.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
|
||||
@ -456,14 +456,14 @@ webService.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQuery
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2]
|
||||
**enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
|
||||
**enumFormStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -617,11 +617,11 @@ To test the collection format in query parameters
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(FakeApi::class.java)
|
||||
val pipe : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val ioutil : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val http : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val url : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val context : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val pipe : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val ioutil : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val http : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val url : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
val context : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
|
||||
|
||||
webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
```
|
||||
@ -630,11 +630,11 @@ webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pipe** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**ioutil** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**http** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**url** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**context** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**pipe** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**ioutil** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**http** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**url** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
**context** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **kotlin.Long** | | [optional]
|
||||
**float** | **kotlin.Float** | | [optional]
|
||||
**double** | **kotlin.Double** | | [optional]
|
||||
**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||
**string** | **kotlin.String** | | [optional]
|
||||
**binary** | [**java.io.File**](java.io.File.md) | | [optional]
|
||||
**dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**`123minusList`** | **kotlin.String** | | [optional]
|
||||
**`123list`** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -103,20 +103,20 @@ Multiple status values can be provided with comma separated strings
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(PetApi::class.java)
|
||||
val status : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Status values that need to be considered for filter
|
||||
val status : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Status values that need to be considered for filter
|
||||
|
||||
val result : kotlin.Array<Pet> = webService.findPetsByStatus(status)
|
||||
val result : kotlin.collections.List<Pet> = webService.findPetsByStatus(status)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
**status** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
[**kotlin.Array<Pet>**](Pet.md)
|
||||
[**kotlin.collections.List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -141,20 +141,20 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(PetApi::class.java)
|
||||
val tags : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Tags to filter by
|
||||
val tags : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> | Tags to filter by
|
||||
|
||||
val result : kotlin.Array<Pet> = webService.findPetsByTags(tags)
|
||||
val result : kotlin.collections.List<Pet> = webService.findPetsByTags(tags)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by |
|
||||
**tags** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**kotlin.Array<Pet>**](Pet.md)
|
||||
[**kotlin.collections.List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional]
|
||||
**dollarSpecialPropertyName** | **kotlin.Long** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ Creates list of users with given input array
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(UserApi::class.java)
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
val user : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
|
||||
webService.createUsersWithArrayInput(user)
|
||||
```
|
||||
@ -73,7 +73,7 @@ webService.createUsersWithArrayInput(user)
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
**user** | [**kotlin.collections.List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -100,7 +100,7 @@ Creates list of users with given input array
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(UserApi::class.java)
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
val user : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
|
||||
webService.createUsersWithListInput(user)
|
||||
```
|
||||
@ -109,7 +109,7 @@ webService.createUsersWithListInput(user)
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
**user** | [**kotlin.collections.List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -13,6 +13,8 @@ import org.openapitools.client.models.OuterComposite
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
import okhttp3.MultipartBody
|
||||
|
||||
interface FakeApi {
|
||||
/**
|
||||
* Health check endpoint
|
||||
@ -37,7 +39,7 @@ interface FakeApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@GET("fake/http-signature-test")
|
||||
fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String, @Header("header_1") header1: kotlin.String): Completable
|
||||
fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String? = null, @Header("header_1") header1: kotlin.String): Completable
|
||||
|
||||
/**
|
||||
*
|
||||
@ -159,18 +161,18 @@ interface FakeApi {
|
||||
* - 404: Not found
|
||||
*
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$")
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@GET("fake")
|
||||
fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.Array<kotlin.String>, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.Array<kotlin.String>, @Query("enum_query_string") enumQueryString: kotlin.String, @Query("enum_query_integer") enumQueryInteger: kotlin.Int, @Query("enum_query_double") enumQueryDouble: kotlin.Double, @Field("enum_form_string_array") enumFormStringArray: kotlin.Array<kotlin.String>, @Field("enum_form_string") enumFormString: kotlin.String): Completable
|
||||
fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.collections.List<kotlin.String>, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.collections.List<kotlin.String>? = null, @Query("enum_query_string") enumQueryString: kotlin.String? = null, @Query("enum_query_integer") enumQueryInteger: kotlin.Int? = null, @Query("enum_query_double") enumQueryDouble: kotlin.Double? = null, @Field("enum_form_string_array") enumFormStringArray: kotlin.collections.List<kotlin.String>, @Field("enum_form_string") enumFormString: kotlin.String): Completable
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
@ -187,7 +189,7 @@ interface FakeApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@DELETE("fake")
|
||||
fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long): Completable
|
||||
fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int? = null, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long? = null): Completable
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
@ -229,6 +231,6 @@ interface FakeApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@PUT("fake/test-query-paramters")
|
||||
fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.Array<kotlin.String>, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.Array<kotlin.String>): Completable
|
||||
fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.collections.List<kotlin.String>, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.collections.List<kotlin.String>): Completable
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,14 @@ import io.reactivex.Completable
|
||||
import org.openapitools.client.models.ApiResponse
|
||||
import org.openapitools.client.models.Pet
|
||||
|
||||
import okhttp3.MultipartBody
|
||||
|
||||
interface PetApi {
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 405: Invalid input
|
||||
*
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
@ -26,6 +29,7 @@ interface PetApi {
|
||||
* Deletes a pet
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 400: Invalid pet value
|
||||
*
|
||||
* @param petId Pet id to delete
|
||||
@ -43,10 +47,10 @@ interface PetApi {
|
||||
* - 400: Invalid status value
|
||||
*
|
||||
* @param status Status values that need to be considered for filter
|
||||
* @return [Call]<[kotlin.Array<Pet>]>
|
||||
* @return [Call]<[kotlin.collections.List<Pet>]>
|
||||
*/
|
||||
@GET("pet/findByStatus")
|
||||
fun findPetsByStatus(@Query("status") status: CSVParams): Single<kotlin.Array<Pet>>
|
||||
fun findPetsByStatus(@Query("status") status: CSVParams): Single<kotlin.collections.List<Pet>>
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
@ -56,11 +60,11 @@ interface PetApi {
|
||||
* - 400: Invalid tag value
|
||||
*
|
||||
* @param tags Tags to filter by
|
||||
* @return [Call]<[kotlin.Array<Pet>]>
|
||||
* @return [Call]<[kotlin.collections.List<Pet>]>
|
||||
*/
|
||||
@Deprecated("This api was deprecated")
|
||||
@GET("pet/findByTags")
|
||||
fun findPetsByTags(@Query("tags") tags: CSVParams): Single<kotlin.Array<Pet>>
|
||||
fun findPetsByTags(@Query("tags") tags: CSVParams): Single<kotlin.collections.List<Pet>>
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
@ -80,6 +84,7 @@ interface PetApi {
|
||||
* Update an existing pet
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 400: Invalid ID supplied
|
||||
* - 404: Pet not found
|
||||
* - 405: Validation exception
|
||||
@ -94,6 +99,7 @@ interface PetApi {
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* Responses:
|
||||
* - 200: Successful operation
|
||||
* - 405: Invalid input
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated
|
||||
|
@ -31,7 +31,7 @@ interface UserApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@POST("user/createWithArray")
|
||||
fun createUsersWithArrayInput(@Body user: kotlin.Array<User>): Completable
|
||||
fun createUsersWithArrayInput(@Body user: kotlin.collections.List<User>): Completable
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -43,7 +43,7 @@ interface UserApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@POST("user/createWithList")
|
||||
fun createUsersWithListInput(@Body user: kotlin.Array<User>): Completable
|
||||
fun createUsersWithListInput(@Body user: kotlin.collections.List<User>): Completable
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
|
@ -22,7 +22,8 @@ import retrofit2.converter.gson.GsonConverterFactory
|
||||
class ApiClient(
|
||||
private var baseUrl: String = defaultBasePath,
|
||||
private val okHttpClientBuilder: OkHttpClient.Builder? = null,
|
||||
private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder
|
||||
private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder,
|
||||
private val okHttpClient : OkHttpClient? = null
|
||||
) {
|
||||
private val apiAuthorizations = mutableMapOf<String, Interceptor>()
|
||||
var logger: ((String) -> Unit)? = null
|
||||
@ -226,7 +227,8 @@ class ApiClient(
|
||||
}
|
||||
|
||||
fun <S> createService(serviceClass: Class<S>): S {
|
||||
return retrofitBuilder.client(clientBuilder.build()).build().create(serviceClass)
|
||||
val usedClient = this.okHttpClient ?: clientBuilder.build()
|
||||
return retrofitBuilder.client(usedClient).build().create(serviceClass)
|
||||
}
|
||||
|
||||
private fun normalizeBaseUrl() {
|
||||
|
@ -11,7 +11,6 @@ import java.util.Date
|
||||
object Serializer {
|
||||
@JvmStatic
|
||||
val gsonBuilder: GsonBuilder = GsonBuilder()
|
||||
.registerTypeAdapter(Date::class.java, DateAdapter())
|
||||
.registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter())
|
||||
.registerTypeAdapter(LocalDate::class.java, LocalDateAdapter())
|
||||
|
@ -26,6 +26,7 @@ import java.io.Serializable
|
||||
* @param int64
|
||||
* @param float
|
||||
* @param double
|
||||
* @param decimal
|
||||
* @param string
|
||||
* @param binary
|
||||
* @param dateTime
|
||||
@ -53,6 +54,8 @@ data class FormatTest (
|
||||
val float: kotlin.Float? = null,
|
||||
@SerializedName("double")
|
||||
val double: kotlin.Double? = null,
|
||||
@SerializedName("decimal")
|
||||
val decimal: java.math.BigDecimal? = null,
|
||||
@SerializedName("string")
|
||||
val string: kotlin.String? = null,
|
||||
@SerializedName("binary")
|
||||
|
@ -17,12 +17,12 @@ import java.io.Serializable
|
||||
|
||||
/**
|
||||
*
|
||||
* @param `123minusList`
|
||||
* @param `123list`
|
||||
*/
|
||||
|
||||
data class List (
|
||||
@SerializedName("123-list")
|
||||
val `123minusList`: kotlin.String? = null
|
||||
val `123list`: kotlin.String? = null
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
@ -17,12 +17,12 @@ import java.io.Serializable
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket
|
||||
* @param dollarSpecialPropertyName
|
||||
*/
|
||||
|
||||
data class SpecialModelname (
|
||||
@SerializedName("\$special[property.name]")
|
||||
val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null
|
||||
val dollarSpecialPropertyName: kotlin.Long? = null
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
@ -27,12 +27,6 @@ docs/Foo.md
|
||||
docs/FormatTest.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineObject.md
|
||||
docs/InlineObject1.md
|
||||
docs/InlineObject2.md
|
||||
docs/InlineObject3.md
|
||||
docs/InlineObject4.md
|
||||
docs/InlineObject5.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/List.md
|
||||
docs/MapTest.md
|
||||
@ -102,12 +96,6 @@ src/commonMain/kotlin/org/openapitools/client/models/Foo.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/FormatTest.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/HealthCheckResult.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/InlineObject.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/InlineObject1.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/InlineObject2.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/InlineObject3.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/InlineObject4.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/InlineObject5.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/InlineResponseDefault.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/List.kt
|
||||
src/commonMain/kotlin/org/openapitools/client/models/MapTest.kt
|
||||
|
@ -1 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
5.0.1-SNAPSHOT
|
@ -92,12 +92,6 @@ Class | Method | HTTP request | Description
|
||||
- [org.openapitools.client.models.FormatTest](docs/FormatTest.md)
|
||||
- [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [org.openapitools.client.models.InlineObject](docs/InlineObject.md)
|
||||
- [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md)
|
||||
- [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md)
|
||||
- [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md)
|
||||
- [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md)
|
||||
- [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md)
|
||||
- [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [org.openapitools.client.models.List](docs/List.md)
|
||||
- [org.openapitools.client.models.MapTest](docs/MapTest.md)
|
||||
|
@ -551,13 +551,13 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2]
|
||||
**enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
|
||||
**enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **kotlin.Long** | | [optional]
|
||||
**float** | **kotlin.Float** | | [optional]
|
||||
**double** | **kotlin.Double** | | [optional]
|
||||
**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||
**string** | **kotlin.String** | | [optional]
|
||||
**binary** | [**org.openapitools.client.infrastructure.OctetByteArray**](org.openapitools.client.infrastructure.OctetByteArray.md) | | [optional]
|
||||
**dateTime** | **kotlin.String** | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**`123minusList`** | **kotlin.String** | | [optional]
|
||||
**`123list`** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional]
|
||||
**dollarSpecialPropertyName** | **kotlin.Long** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -405,13 +405,13 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor(
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$")
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @return void
|
||||
*/
|
||||
suspend fun testEnumParameters(enumHeaderStringArray: kotlin.collections.List<kotlin.String>?, enumHeaderString: kotlin.String?, enumQueryStringArray: kotlin.collections.List<kotlin.String>?, enumQueryString: kotlin.String?, enumQueryInteger: kotlin.Int?, enumQueryDouble: kotlin.Double?, enumFormStringArray: kotlin.collections.List<kotlin.String>?, enumFormString: kotlin.String?): HttpResponse<Unit> {
|
||||
|
@ -46,7 +46,6 @@ open class ApiClient(
|
||||
val clientConfig: (HttpClientConfig<*>) -> Unit = { it.install(JsonFeature, jsonConfig) }
|
||||
httpClientEngine?.let { HttpClient(it, clientConfig) } ?: HttpClient(clientConfig)
|
||||
}
|
||||
|
||||
private val authentications: kotlin.collections.Map<String, Authentication> by lazy {
|
||||
mapOf(
|
||||
"api_key" to ApiKeyAuth("header", "api_key"),
|
||||
@ -98,12 +97,6 @@ open class ApiClient(
|
||||
serializer.setMapper(org.openapitools.client.models.FormatTest::class, org.openapitools.client.models.FormatTest.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.HasOnlyReadOnly::class, org.openapitools.client.models.HasOnlyReadOnly.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.HealthCheckResult::class, org.openapitools.client.models.HealthCheckResult.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.InlineObject::class, org.openapitools.client.models.InlineObject.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.InlineObject1::class, org.openapitools.client.models.InlineObject1.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.InlineObject2::class, org.openapitools.client.models.InlineObject2.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.InlineObject3::class, org.openapitools.client.models.InlineObject3.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.InlineObject4::class, org.openapitools.client.models.InlineObject4.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.InlineObject5::class, org.openapitools.client.models.InlineObject5.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.InlineResponseDefault::class, org.openapitools.client.models.InlineResponseDefault.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.List::class, org.openapitools.client.models.List.serializer())
|
||||
serializer.setMapper(org.openapitools.client.models.MapTest::class, org.openapitools.client.models.MapTest.serializer())
|
||||
@ -133,7 +126,7 @@ open class ApiClient(
|
||||
* @param username Username
|
||||
*/
|
||||
fun setUsername(username: String) {
|
||||
val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth?
|
||||
val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth?
|
||||
?: throw Exception("No HTTP basic authentication configured")
|
||||
auth.username = username
|
||||
}
|
||||
@ -144,7 +137,7 @@ open class ApiClient(
|
||||
* @param password Password
|
||||
*/
|
||||
fun setPassword(password: String) {
|
||||
val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth?
|
||||
val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth?
|
||||
?: throw Exception("No HTTP basic authentication configured")
|
||||
auth.password = password
|
||||
}
|
||||
@ -156,7 +149,7 @@ open class ApiClient(
|
||||
* @param paramName The name of the API key parameter, or null or set the first key.
|
||||
*/
|
||||
fun setApiKey(apiKey: String, paramName: String? = null) {
|
||||
val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth?
|
||||
val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth?
|
||||
?: throw Exception("No API key authentication configured")
|
||||
auth.apiKey = apiKey
|
||||
}
|
||||
@ -168,7 +161,7 @@ open class ApiClient(
|
||||
* @param paramName The name of the API key parameter, or null or set the first key.
|
||||
*/
|
||||
fun setApiKeyPrefix(apiKeyPrefix: String, paramName: String? = null) {
|
||||
val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth?
|
||||
val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth?
|
||||
?: throw Exception("No API key authentication configured")
|
||||
auth.apiKeyPrefix = apiKeyPrefix
|
||||
}
|
||||
@ -179,7 +172,7 @@ open class ApiClient(
|
||||
* @param accessToken Access token
|
||||
*/
|
||||
fun setAccessToken(accessToken: String) {
|
||||
val auth = authentications.values.firstOrNull { it is OAuth } as OAuth?
|
||||
val auth = authentications?.values?.firstOrNull { it is OAuth } as OAuth?
|
||||
?: throw Exception("No OAuth2 authentication configured")
|
||||
auth.accessToken = accessToken
|
||||
}
|
||||
@ -190,7 +183,7 @@ open class ApiClient(
|
||||
* @param bearerToken The bearer token.
|
||||
*/
|
||||
fun setBearerToken(bearerToken: String) {
|
||||
val auth = authentications.values.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth?
|
||||
val auth = authentications?.values?.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth?
|
||||
?: throw Exception("No Bearer authentication configured")
|
||||
auth.bearerToken = bearerToken
|
||||
}
|
||||
@ -234,7 +227,7 @@ open class ApiClient(
|
||||
|
||||
private fun RequestConfig.updateForAuth(authNames: kotlin.collections.List<String>) {
|
||||
for (authName in authNames) {
|
||||
val auth = authentications[authName] ?: throw Exception("Authentication undefined: $authName")
|
||||
val auth = authentications?.get(authName) ?: throw Exception("Authentication undefined: $authName")
|
||||
auth.apply(query, headers)
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
* @param int64
|
||||
* @param float
|
||||
* @param double
|
||||
* @param decimal
|
||||
* @param string
|
||||
* @param binary
|
||||
* @param dateTime
|
||||
@ -44,6 +45,7 @@ data class FormatTest (
|
||||
@SerialName(value = "int64") val int64: kotlin.Long? = null,
|
||||
@SerialName(value = "float") val float: kotlin.Float? = null,
|
||||
@SerialName(value = "double") val double: kotlin.Double? = null,
|
||||
@SerialName(value = "decimal") val decimal: java.math.BigDecimal? = null,
|
||||
@SerialName(value = "string") val string: kotlin.String? = null,
|
||||
@SerialName(value = "binary") val binary: org.openapitools.client.infrastructure.OctetByteArray? = null,
|
||||
@SerialName(value = "dateTime") val dateTime: kotlin.String? = null,
|
||||
|
@ -17,10 +17,10 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
|
||||
/**
|
||||
*
|
||||
* @param `123minusList`
|
||||
* @param `123list`
|
||||
*/
|
||||
@Serializable
|
||||
data class List (
|
||||
@SerialName(value = "123-list") val `123minusList`: kotlin.String? = null
|
||||
@SerialName(value = "123-list") val `123list`: kotlin.String? = null
|
||||
)
|
||||
|
||||
|
@ -17,10 +17,10 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket
|
||||
* @param dollarSpecialPropertyName
|
||||
*/
|
||||
@Serializable
|
||||
data class SpecialModelname (
|
||||
@SerialName(value = "\$special[property.name]") val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null
|
||||
@SerialName(value = "\$special[property.name]") val dollarSpecialPropertyName: kotlin.Long? = null
|
||||
)
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
.openapi-generator-ignore
|
||||
README.md
|
||||
build.gradle
|
||||
docs/200Response.md
|
||||
@ -28,12 +27,6 @@ docs/Foo.md
|
||||
docs/FormatTest.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineObject.md
|
||||
docs/InlineObject1.md
|
||||
docs/InlineObject2.md
|
||||
docs/InlineObject3.md
|
||||
docs/InlineObject4.md
|
||||
docs/InlineObject5.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/List.md
|
||||
docs/MapTest.md
|
||||
@ -100,12 +93,6 @@ src/main/kotlin/org/openapitools/client/models/Foo.kt
|
||||
src/main/kotlin/org/openapitools/client/models/FormatTest.kt
|
||||
src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt
|
||||
src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject1.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject2.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject3.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject4.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineObject5.kt
|
||||
src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt
|
||||
src/main/kotlin/org/openapitools/client/models/List.kt
|
||||
src/main/kotlin/org/openapitools/client/models/MapTest.kt
|
||||
|
@ -1 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
5.0.1-SNAPSHOT
|
@ -101,12 +101,6 @@ Class | Method | HTTP request | Description
|
||||
- [org.openapitools.client.models.FormatTest](docs/FormatTest.md)
|
||||
- [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [org.openapitools.client.models.InlineObject](docs/InlineObject.md)
|
||||
- [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md)
|
||||
- [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md)
|
||||
- [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md)
|
||||
- [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md)
|
||||
- [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md)
|
||||
- [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [org.openapitools.client.models.List](docs/List.md)
|
||||
- [org.openapitools.client.models.MapTest](docs/MapTest.md)
|
||||
|
@ -29,11 +29,9 @@ test {
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0"
|
||||
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||
compile "com.squareup.moshi:moshi-kotlin:1.9.2"
|
||||
compile "com.squareup.moshi:moshi-adapters:1.9.2"
|
||||
compile "com.squareup.okhttp3:okhttp:4.2.2"
|
||||
compile "com.squareup.okhttp3:logging-interceptor:4.4.0"
|
||||
testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0"
|
||||
}
|
||||
|
@ -551,13 +551,13 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2]
|
||||
**enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
|
||||
**enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)]
|
||||
**enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
||||
**int64** | **kotlin.Long** | | [optional]
|
||||
**float** | **kotlin.Float** | | [optional]
|
||||
**double** | **kotlin.Double** | | [optional]
|
||||
**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||
**string** | **kotlin.String** | | [optional]
|
||||
**binary** | [**java.io.File**](java.io.File.md) | | [optional]
|
||||
**dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**`123minusList`** | **kotlin.String** | | [optional]
|
||||
**`123list`** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional]
|
||||
**dollarSpecialPropertyName** | **kotlin.Long** | | [optional]
|
||||
|
||||
|
||||
|
||||
|
@ -98,7 +98,8 @@ class FakeApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
||||
put("query_1", listOf(query1.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("header_1" to header1.toString())
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
header1?.apply { localVariableHeaders["header_1"] = this.toString() }
|
||||
val localVariableConfig = RequestConfig(
|
||||
RequestMethod.GET,
|
||||
"/fake/http-signature-test",
|
||||
@ -471,13 +472,13 @@ class FakeApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$")
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to "-efg")
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @return void
|
||||
* @throws UnsupportedOperationException If the API returns an informational or redirection response
|
||||
* @throws ClientException If the API returns a client error response
|
||||
@ -501,7 +502,9 @@ class FakeApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
||||
put("enum_query_double", listOf(enumQueryDouble.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded", "enum_header_string_array" to enumHeaderStringArray.joinToString(separator = collectionDelimiter("csv")), "enum_header_string" to enumHeaderString.toString())
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded")
|
||||
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",
|
||||
@ -556,7 +559,9 @@ class FakeApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
||||
put("int64_group", listOf(int64Group.toString()))
|
||||
}
|
||||
}
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("required_boolean_group" to requiredBooleanGroup.toString(), "boolean_group" to booleanGroup.toString())
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
requiredBooleanGroup?.apply { localVariableHeaders["required_boolean_group"] = this.toString() }
|
||||
booleanGroup?.apply { localVariableHeaders["boolean_group"] = this.toString() }
|
||||
val localVariableConfig = RequestConfig(
|
||||
RequestMethod.DELETE,
|
||||
"/fake",
|
||||
|
@ -88,7 +88,8 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit {
|
||||
val localVariableBody: kotlin.Any? = null
|
||||
val localVariableQuery: MultiValueMap = mutableMapOf()
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("api_key" to apiKey.toString())
|
||||
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||
apiKey?.apply { localVariableHeaders["api_key"] = this.toString() }
|
||||
val localVariableConfig = RequestConfig(
|
||||
RequestMethod.DELETE,
|
||||
"/pet/{petId}".replace("{"+"petId"+"}", "$petId"),
|
||||
|
@ -10,6 +10,7 @@ val Response.isInformational : Boolean get() = this.code in 100..199
|
||||
/**
|
||||
* Provides an extension to evaluation whether the response is a 3xx code
|
||||
*/
|
||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
|
||||
val Response.isRedirect : Boolean get() = this.code in 300..399
|
||||
|
||||
/**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user