[kotlin][client] add info if endpoints requires authentication or not (#14445)

* [kotlin][client] add info if endpoints requires authentication or not

* [kotlin][client] update sample projects

* [kotlin][client] add info if endpoints requires authentication or not

* [kotlin][client] update sample projects
This commit is contained in:
Bruno Coelho
2023-01-13 10:29:27 +00:00
committed by GitHub
parent b6ad68baca
commit d348754399
86 changed files with 406 additions and 65 deletions

View File

@@ -110,6 +110,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
path = "/pet",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
@@ -181,6 +182,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
path = "/pet/{petId}".replace("{"+"petId"+"}", encodeURIComponent(petId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
@@ -263,6 +265,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
path = "/pet/findByStatus",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
@@ -341,6 +344,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
path = "/pet/findByTags",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
@@ -411,6 +415,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
path = "/pet/{petId}".replace("{"+"petId"+"}", encodeURIComponent(petId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
@@ -479,6 +484,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
path = "/pet",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
@@ -554,6 +560,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
path = "/pet/{petId}".replace("{"+"petId"+"}", encodeURIComponent(petId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
@@ -632,6 +639,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", encodeURIComponent(petId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}

View File

@@ -108,6 +108,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/store/order/{orderId}".replace("{"+"orderId"+"}", encodeURIComponent(orderId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -175,6 +176,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/store/inventory",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
@@ -245,6 +247,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/store/order/{orderId}".replace("{"+"orderId"+"}", encodeURIComponent(orderId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -315,6 +318,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/store/order",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}

View File

@@ -108,6 +108,7 @@ class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/user",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -175,6 +176,7 @@ class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/user/createWithArray",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -242,6 +244,7 @@ class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/user/createWithList",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -309,6 +312,7 @@ class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/user/{username}".replace("{"+"username"+"}", encodeURIComponent(username.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -379,6 +383,7 @@ class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/user/{username}".replace("{"+"username"+"}", encodeURIComponent(username.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -456,6 +461,7 @@ class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/user/login",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -520,6 +526,7 @@ class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/user/logout",
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}
@@ -590,6 +597,7 @@ class UserApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient =
path = "/user/{username}".replace("{"+"username"+"}", encodeURIComponent(username.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = false,
body = localVariableBody
)
}

View File

@@ -13,5 +13,6 @@ data class RequestConfig<T>(
val path: String,
val headers: MutableMap<String, String> = mutableMapOf(),
val query: MutableMap<String, List<String>> = mutableMapOf(),
val requiresAuthentication: Boolean,
val body: T? = null
)