forked from loafle/openapi-generator-original
Change default package name value for kotlin client (#382)
* Move pom.xml to sample.ci * Regenerate 'kotlin-threetenbp' example * Add build to gitignore * Change default value for Kotlin * Regenerate kotlin-string client * Regenerate kotlin-threetenbp client * Regenerate 'samples/client/petstore/kotlin'
This commit is contained in:
committed by
William Cheng
parent
e2d6f7c88f
commit
d35bf1a388
@@ -1,4 +1,4 @@
|
||||
# io.swagger.client - Kotlin client library for OpenAPI Petstore
|
||||
# org.openapitools.client - Kotlin client library for OpenAPI Petstore
|
||||
|
||||
## Requires
|
||||
|
||||
@@ -60,12 +60,12 @@ Class | Method | HTTP request | Description
|
||||
<a name="documentation-for-models"></a>
|
||||
## Documentation for Models
|
||||
|
||||
- [io.swagger.client.models.ApiResponse](docs/ApiResponse.md)
|
||||
- [io.swagger.client.models.Category](docs/Category.md)
|
||||
- [io.swagger.client.models.Order](docs/Order.md)
|
||||
- [io.swagger.client.models.Pet](docs/Pet.md)
|
||||
- [io.swagger.client.models.Tag](docs/Tag.md)
|
||||
- [io.swagger.client.models.User](docs/User.md)
|
||||
- [org.openapitools.client.models.ApiResponse](docs/ApiResponse.md)
|
||||
- [org.openapitools.client.models.Category](docs/Category.md)
|
||||
- [org.openapitools.client.models.Order](docs/Order.md)
|
||||
- [org.openapitools.client.models.Pet](docs/Pet.md)
|
||||
- [org.openapitools.client.models.Tag](docs/Tag.md)
|
||||
- [org.openapitools.client.models.User](docs/User.md)
|
||||
|
||||
|
||||
<a name="documentation-for-authorization"></a>
|
||||
|
||||
@@ -23,8 +23,8 @@ Add a new pet to the store
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
@@ -67,8 +67,8 @@ Deletes a pet
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | Pet id to delete
|
||||
@@ -115,8 +115,8 @@ Multiple status values can be provided with comma separated strings
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val status : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Status values that need to be considered for filter
|
||||
@@ -162,8 +162,8 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val tags : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Tags to filter by
|
||||
@@ -209,8 +209,8 @@ Returns a single pet
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to return
|
||||
@@ -254,8 +254,8 @@ Update an existing pet
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
@@ -298,8 +298,8 @@ Updates a pet in the store with form data
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be updated
|
||||
@@ -346,8 +346,8 @@ uploads an image
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to update
|
||||
|
||||
@@ -21,8 +21,8 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
val orderId : kotlin.String = orderId_example // kotlin.String | ID of the order that needs to be deleted
|
||||
@@ -67,8 +67,8 @@ Returns a map of status codes to quantities
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
try {
|
||||
@@ -110,8 +110,8 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
val orderId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be fetched
|
||||
@@ -155,8 +155,8 @@ Place an order for a pet
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
val order : Order = // Order | order placed for purchasing the pet
|
||||
|
||||
@@ -25,8 +25,8 @@ This can only be done by the logged in user.
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val user : User = // User | Created user object
|
||||
@@ -69,8 +69,8 @@ Creates list of users with given input array
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
@@ -113,8 +113,8 @@ Creates list of users with given input array
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
@@ -159,8 +159,8 @@ This can only be done by the logged in user.
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | The name that needs to be deleted
|
||||
@@ -203,8 +203,8 @@ Get user by user name
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | The name that needs to be fetched. Use user1 for testing.
|
||||
@@ -248,8 +248,8 @@ Logs user into the system
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | The user name for login
|
||||
@@ -295,8 +295,8 @@ Logs out current logged in user session
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
try {
|
||||
@@ -337,8 +337,8 @@ This can only be done by the logged in user.
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import io.swagger.client.infrastructure.*
|
||||
//import io.swagger.client.models.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | name that need to be deleted
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.apis
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import io.swagger.client.models.ApiResponse
|
||||
import io.swagger.client.models.Pet
|
||||
import org.openapitools.client.models.ApiResponse
|
||||
import org.openapitools.client.models.Pet
|
||||
|
||||
import io.swagger.client.infrastructure.*
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) {
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.apis
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import io.swagger.client.models.Order
|
||||
import org.openapitools.client.models.Order
|
||||
|
||||
import io.swagger.client.infrastructure.*
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) {
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.apis
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import io.swagger.client.models.User
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
import io.swagger.client.infrastructure.*
|
||||
import org.openapitools.client.infrastructure.*
|
||||
|
||||
class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiClient(basePath) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
typealias MultiValueMap = Map<String,List<String>>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import okhttp3.*
|
||||
import java.io.File
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
enum class ResponseType {
|
||||
Success, Informational, Redirection, ClientError, ServerError
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import kotlin.properties.ReadWriteProperty
|
||||
import kotlin.reflect.KProperty
|
||||
@@ -1,5 +1,5 @@
|
||||
@file:Suppress("unused")
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import java.lang.RuntimeException
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
/**
|
||||
* Defines a config object for a given request.
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
/**
|
||||
* Provides enumerated HTTP verbs
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import okhttp3.Response
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.swagger.client.infrastructure
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.squareup.moshi.KotlinJsonAdapterFactory
|
||||
import com.squareup.moshi.Moshi
|
||||
@@ -9,7 +9,7 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.models
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
/**
|
||||
@@ -9,7 +9,7 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.models
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
/**
|
||||
@@ -9,7 +9,7 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.models
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.squareup.moshi.Json
|
||||
@@ -9,10 +9,10 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.models
|
||||
package org.openapitools.client.models
|
||||
|
||||
import io.swagger.client.models.Category
|
||||
import io.swagger.client.models.Tag
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.squareup.moshi.Json
|
||||
/**
|
||||
@@ -9,7 +9,7 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.models
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
/**
|
||||
@@ -9,7 +9,7 @@
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
package io.swagger.client.models
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
/**
|
||||
Reference in New Issue
Block a user