forked from loafle/openapi-generator-original
[Kotlin][okhttp] replace okhttpclient with callfactory (#19422)
This commit is contained in:
parent
0f294a5129
commit
7a7c8c19ab
@ -2,7 +2,7 @@
|
|||||||
package {{apiPackage}}
|
package {{apiPackage}}
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
{{#imports}}import {{import}}
|
{{#imports}}import {{import}}
|
||||||
@ -48,7 +48,7 @@ import {{packageName}}.infrastructure.Success
|
|||||||
import {{packageName}}.infrastructure.toMultiValue
|
import {{packageName}}.infrastructure.toMultiValue
|
||||||
|
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
{{#nonPublicApi}}internal {{/nonPublicApi}}class {{classname}}(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
{{#nonPublicApi}}internal {{/nonPublicApi}}class {{classname}}(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -60,7 +60,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
{{#nonPublicApi}}internal {{/nonPublicApi}}val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
{{#nonPublicApi}}internal {{/nonPublicApi}}val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
{{#nonPublicApi}}internal {{/nonPublicApi}}open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
{{#nonPublicApi}}internal {{/nonPublicApi}}open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
|
|
||||||
@ -36,7 +36,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Bird
|
import org.openapitools.client.models.Bird
|
||||||
@ -37,7 +37,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 BirdApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class BirdApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
|
|
||||||
@ -36,7 +36,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Apa
|
import org.openapitools.client.models.Apa
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
|
|
||||||
@ -36,7 +36,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelWithEnumPropertyHavingDefault
|
import org.openapitools.client.models.ModelWithEnumPropertyHavingDefault
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class DefaultApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.google.gson.reflect.TypeToken
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.fasterxml.jackson.core.type.TypeReference
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -39,7 +39,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -33,7 +33,7 @@ import kotlinx.serialization.encodeToString
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -40,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 PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -39,7 +39,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -39,7 +39,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -34,7 +34,7 @@ import com.google.gson.reflect.TypeToken
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Environment
|
import org.openapitools.client.models.Environment
|
||||||
@ -37,7 +37,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 FakeApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class FakeApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
internal class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
internal class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
internal class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
internal val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
internal val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
internal open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
internal open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.PetEnum
|
import org.openapitools.client.models.PetEnum
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class EnumApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -32,7 +32,7 @@ import kotlinx.serialization.encodeToString
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.ModelApiResponse
|
import org.openapitools.client.models.ModelApiResponse
|
||||||
@ -38,7 +38,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class PetApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.Order
|
import org.openapitools.client.models.Order
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class StoreApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
package org.openapitools.client.apis
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.Call
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
import org.openapitools.client.models.User
|
import org.openapitools.client.models.User
|
||||||
@ -37,7 +37,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, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
class UserApi(basePath: kotlin.String = defaultBasePath, client: Call.Factory = ApiClient.defaultClient) : ApiClient(basePath, client) {
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val defaultBasePath: String by lazy {
|
val defaultBasePath: String by lazy {
|
||||||
|
@ -31,7 +31,7 @@ import com.squareup.moshi.adapter
|
|||||||
|
|
||||||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody()
|
||||||
|
|
||||||
open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) {
|
open class ApiClient(val baseUrl: String, val client: Call.Factory = 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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user