forked from loafle/openapi-generator-original
Co-authored-by: Grigory Tihonov <grigory.tihonov@lamoda.ru>
This commit is contained in:
parent
de8decc9f5
commit
73b0762f36
@ -2,6 +2,7 @@
|
|||||||
package {{apiPackage}}
|
package {{apiPackage}}
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
{{#imports}}import {{import}}
|
{{#imports}}import {{import}}
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
@ -46,7 +47,7 @@ import {{packageName}}.infrastructure.Success
|
|||||||
import {{packageName}}.infrastructure.toMultiValue
|
import {{packageName}}.infrastructure.toMultiValue
|
||||||
|
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
{{#nonPublicApi}}internal {{/nonPublicApi}}class {{classname}}(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
{{#nonPublicApi}}internal {{/nonPublicApi}}class {{classname}}(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -77,7 +77,7 @@ import com.fasterxml.jackson.core.type.TypeReference
|
|||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
{{/moshi}}
|
{{/moshi}}
|
||||||
|
|
||||||
{{#nonPublicApi}}internal {{/nonPublicApi}}open class ApiClient(val baseUrl: String) {
|
{{#nonPublicApi}}internal {{/nonPublicApi}}open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
{{#nonPublicApi}}internal {{/nonPublicApi}}companion object {
|
{{#nonPublicApi}}internal {{/nonPublicApi}}companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -95,7 +95,7 @@ import com.squareup.moshi.adapter
|
|||||||
const val baseUrlKey = "{{packageName}}.baseUrl"
|
const val baseUrlKey = "{{packageName}}.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
|
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
@ -39,7 +40,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -26,7 +26,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -44,7 +44,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
|
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
@ -39,7 +40,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Apa
|
import org.openapitools.client.models.Apa
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
|
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
@ -39,7 +40,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -26,7 +26,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -44,7 +44,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
|
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
@ -39,7 +40,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelWithEnumPropertyHavingDefault
|
import org.openapitools.client.models.ModelWithEnumPropertyHavingDefault
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.fasterxml.jackson.core.type.TypeReference
|
import com.fasterxml.jackson.core.type.TypeReference
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -30,7 +30,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -48,7 +48,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -43,7 +44,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -32,7 +32,7 @@ import kotlin.coroutines.resumeWithException
|
|||||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -50,7 +50,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
internal class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
internal class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
internal class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
internal open class ApiClient(val baseUrl: String) {
|
internal open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
internal companion object {
|
internal companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ internal open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -26,7 +26,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -44,7 +44,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import org.threeten.bp.OffsetDateTime
|
|||||||
import org.threeten.bp.OffsetTime
|
import org.threeten.bp.OffsetTime
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.PetEnum
|
import org.openapitools.client.models.PetEnum
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class EnumApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class EnumApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
import org.openapitools.client.models.Pet
|
import org.openapitools.client.models.Pet
|
||||||
@ -41,7 +42,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ import org.openapitools.client.infrastructure.ResponseType
|
|||||||
import org.openapitools.client.infrastructure.Success
|
import org.openapitools.client.infrastructure.Success
|
||||||
import org.openapitools.client.infrastructure.toMultiValue
|
import org.openapitools.client.infrastructure.toMultiValue
|
||||||
|
|
||||||
class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -29,7 +29,7 @@ import java.time.OffsetTime
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.squareup.moshi.adapter
|
import com.squareup.moshi.adapter
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String) {
|
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
||||||
companion object {
|
companion object {
|
||||||
protected const val ContentType = "Content-Type"
|
protected const val ContentType = "Content-Type"
|
||||||
protected const val Accept = "Accept"
|
protected const val Accept = "Accept"
|
||||||
@ -47,7 +47,7 @@ open class ApiClient(val baseUrl: String) {
|
|||||||
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
const val baseUrlKey = "org.openapitools.client.baseUrl"
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val client: OkHttpClient by lazy {
|
val defaultClient: OkHttpClient by lazy {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user