forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin' into 7.0.x
This commit is contained in:
@@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
|
||||
|
||||
## Requires
|
||||
|
||||
* Kotlin 1.6.10
|
||||
* Kotlin 1.7.21
|
||||
* Gradle 7.5
|
||||
|
||||
## Build
|
||||
@@ -80,13 +80,6 @@ Class | Method | HTTP request | Description
|
||||
<a name="documentation-for-authorization"></a>
|
||||
## Documentation for Authorization
|
||||
|
||||
<a name="api_key"></a>
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
<a name="petstore_auth"></a>
|
||||
### petstore_auth
|
||||
|
||||
@@ -97,3 +90,10 @@ Class | Method | HTTP request | Description
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
<a name="api_key"></a>
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ wrapper {
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.10'
|
||||
ext.kotlin_version = '1.7.21'
|
||||
ext.retrofitVersion = '2.9.0'
|
||||
|
||||
repositories {
|
||||
@@ -19,6 +19,7 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
repositories {
|
||||
maven { url "https://repo1.maven.org/maven2" }
|
||||
|
||||
@@ -85,7 +85,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
|
||||
@@ -35,7 +35,7 @@ interface StoreApi {
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Responses:
|
||||
* - 200: successful operation
|
||||
* - 400: Invalid ID supplied
|
||||
|
||||
@@ -64,7 +64,7 @@ class ApiClient(
|
||||
) : this(baseUrl, okHttpClientBuilder, serializerBuilder) {
|
||||
authNames.forEach { authName ->
|
||||
val auth = when (authName) {
|
||||
"api_key" -> ApiKeyAuth("header", "api_key")"petstore_auth" -> OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets")
|
||||
"petstore_auth" -> OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets")"api_key" -> ApiKeyAuth("header", "api_key")
|
||||
else -> throw RuntimeException("auth name $authName not found in available auth names")
|
||||
}
|
||||
addAuthorization(authName, auth)
|
||||
|
||||
Reference in New Issue
Block a user