forked from loafle/openapi-generator-original
remove incorrect max, min in allowableValues (#269)
This commit is contained in:
@@ -1664,12 +1664,6 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
|
||||
// legacy support
|
||||
Map<String, Object> allowableValues = new HashMap<String, Object>();
|
||||
if (p.getMinimum() != null) {
|
||||
allowableValues.put("min", p.getMinimum());
|
||||
}
|
||||
if (p.getMaximum() != null) {
|
||||
allowableValues.put("max", p.getMaximum());
|
||||
}
|
||||
|
||||
if (p.getEnum() != null) {
|
||||
List<Object> _enum = p.getEnum();
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.4.0-SNAPSHOT
|
||||
3.0.0-SNAPSHOT
|
||||
@@ -1,4 +1,4 @@
|
||||
group 'io.swagger'
|
||||
group 'org.openapitools'
|
||||
version '1.0.0'
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
|
||||
@@ -16,12 +16,10 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="addPet"></a>
|
||||
# **addPet**
|
||||
> addPet(body)
|
||||
> addPet(pet)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -29,9 +27,9 @@ Add a new pet to the store
|
||||
//import io.swagger.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val body : Pet = // Pet | Pet object that needs to be added to the store
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.addPet(body)
|
||||
apiInstance.addPet(pet)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#addPet")
|
||||
e.printStackTrace()
|
||||
@@ -45,7 +43,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -58,7 +56,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="deletePet"></a>
|
||||
# **deletePet**
|
||||
@@ -66,8 +64,6 @@ null (empty response body)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -106,7 +102,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="findPetsByStatus"></a>
|
||||
# **findPetsByStatus**
|
||||
@@ -251,12 +247,10 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="updatePet"></a>
|
||||
# **updatePet**
|
||||
> updatePet(body)
|
||||
> updatePet(pet)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -264,9 +258,9 @@ Update an existing pet
|
||||
//import io.swagger.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val body : Pet = // Pet | Pet object that needs to be added to the store
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.updatePet(body)
|
||||
apiInstance.updatePet(pet)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#updatePet")
|
||||
e.printStackTrace()
|
||||
@@ -280,7 +274,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -293,7 +287,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="updatePetWithForm"></a>
|
||||
# **updatePetWithForm**
|
||||
@@ -301,8 +295,6 @@ null (empty response body)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -343,7 +335,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="uploadFile"></a>
|
||||
# **uploadFile**
|
||||
@@ -351,8 +343,6 @@ null (empty response body)
|
||||
|
||||
uploads an image
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -362,7 +352,7 @@ uploads an image
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to update
|
||||
val additionalMetadata : kotlin.String = additionalMetadata_example // kotlin.String | Additional data to pass to server
|
||||
val file : java.io.File = /path/to/file.txt // java.io.File | file to upload
|
||||
val file : java.io.File = BINARY_DATA_HERE // java.io.File | file to upload
|
||||
try {
|
||||
val result : ApiResponse = apiInstance.uploadFile(petId, additionalMetadata, file)
|
||||
println(result)
|
||||
|
||||
@@ -54,7 +54,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="getInventory"></a>
|
||||
# **getInventory**
|
||||
@@ -148,12 +148,10 @@ No authorization required
|
||||
|
||||
<a name="placeOrder"></a>
|
||||
# **placeOrder**
|
||||
> Order placeOrder(body)
|
||||
> Order placeOrder(order)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -161,9 +159,9 @@ Place an order for a pet
|
||||
//import io.swagger.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
val body : Order = // Order | order placed for purchasing the pet
|
||||
val order : Order = // Order | order placed for purchasing the pet
|
||||
try {
|
||||
val result : Order = apiInstance.placeOrder(body)
|
||||
val result : Order = apiInstance.placeOrder(order)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling StoreApi#placeOrder")
|
||||
@@ -178,7 +176,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="createUser"></a>
|
||||
# **createUser**
|
||||
> createUser(body)
|
||||
> createUser(user)
|
||||
|
||||
Create user
|
||||
|
||||
@@ -29,9 +29,9 @@ This can only be done by the logged in user.
|
||||
//import io.swagger.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val body : User = // User | Created user object
|
||||
val user : User = // User | Created user object
|
||||
try {
|
||||
apiInstance.createUser(body)
|
||||
apiInstance.createUser(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUser")
|
||||
e.printStackTrace()
|
||||
@@ -45,7 +45,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -58,16 +58,14 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="createUsersWithArrayInput"></a>
|
||||
# **createUsersWithArrayInput**
|
||||
> createUsersWithArrayInput(body)
|
||||
> createUsersWithArrayInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -75,9 +73,9 @@ Creates list of users with given input array
|
||||
//import io.swagger.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val body : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithArrayInput(body)
|
||||
apiInstance.createUsersWithArrayInput(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUsersWithArrayInput")
|
||||
e.printStackTrace()
|
||||
@@ -91,7 +89,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
**user** | [**kotlin.Array<User>**](kotlin.Array.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -104,16 +102,14 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="createUsersWithListInput"></a>
|
||||
# **createUsersWithListInput**
|
||||
> createUsersWithListInput(body)
|
||||
> createUsersWithListInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -121,9 +117,9 @@ Creates list of users with given input array
|
||||
//import io.swagger.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val body : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithListInput(body)
|
||||
apiInstance.createUsersWithListInput(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUsersWithListInput")
|
||||
e.printStackTrace()
|
||||
@@ -137,7 +133,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
**user** | [**kotlin.Array<User>**](kotlin.Array.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -150,7 +146,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="deleteUser"></a>
|
||||
# **deleteUser**
|
||||
@@ -196,7 +192,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="getUserByName"></a>
|
||||
# **getUserByName**
|
||||
@@ -204,8 +200,6 @@ No authorization required
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -251,8 +245,6 @@ No authorization required
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -300,8 +292,6 @@ No authorization required
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@@ -334,11 +324,11 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="updateUser"></a>
|
||||
# **updateUser**
|
||||
> updateUser(username, body)
|
||||
> updateUser(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
@@ -352,9 +342,9 @@ This can only be done by the logged in user.
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | name that need to be deleted
|
||||
val body : User = // User | Updated user object
|
||||
val user : User = // User | Updated user object
|
||||
try {
|
||||
apiInstance.updateUser(username, body)
|
||||
apiInstance.updateUser(username, user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#updateUser")
|
||||
e.printStackTrace()
|
||||
@@ -369,7 +359,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **kotlin.String**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -382,5 +372,5 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
* @return void
|
||||
*/
|
||||
fun addPet(body: Pet) : Unit {
|
||||
val localVariableBody: kotlin.Any? = body
|
||||
fun addPet(pet: Pet) : Unit {
|
||||
val localVariableBody: kotlin.Any? = pet
|
||||
val localVariableQuery: MultiValueMap = mapOf()
|
||||
val localVariableHeaders: kotlin.collections.Map<kotlin.String,kotlin.String> = mapOf()
|
||||
val localVariableConfig = RequestConfig(
|
||||
@@ -180,11 +180,11 @@ class PetApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCli
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
* @return void
|
||||
*/
|
||||
fun updatePet(body: Pet) : Unit {
|
||||
val localVariableBody: kotlin.Any? = body
|
||||
fun updatePet(pet: Pet) : Unit {
|
||||
val localVariableBody: kotlin.Any? = pet
|
||||
val localVariableQuery: MultiValueMap = mapOf()
|
||||
val localVariableHeaders: kotlin.collections.Map<kotlin.String,kotlin.String> = mapOf()
|
||||
val localVariableConfig = RequestConfig(
|
||||
|
||||
@@ -114,12 +114,12 @@ class StoreApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiC
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet
|
||||
* @param order order placed for purchasing the pet
|
||||
* @return Order
|
||||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun placeOrder(body: Order) : Order {
|
||||
val localVariableBody: kotlin.Any? = body
|
||||
fun placeOrder(order: Order) : Order {
|
||||
val localVariableBody: kotlin.Any? = order
|
||||
val localVariableQuery: MultiValueMap = mapOf()
|
||||
val localVariableHeaders: kotlin.collections.Map<kotlin.String,kotlin.String> = mapOf()
|
||||
val localVariableConfig = RequestConfig(
|
||||
|
||||
@@ -20,11 +20,11 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object
|
||||
* @param user Created user object
|
||||
* @return void
|
||||
*/
|
||||
fun createUser(body: User) : Unit {
|
||||
val localVariableBody: kotlin.Any? = body
|
||||
fun createUser(user: User) : Unit {
|
||||
val localVariableBody: kotlin.Any? = user
|
||||
val localVariableQuery: MultiValueMap = mapOf()
|
||||
val localVariableHeaders: kotlin.collections.Map<kotlin.String,kotlin.String> = mapOf()
|
||||
val localVariableConfig = RequestConfig(
|
||||
@@ -51,11 +51,11 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object
|
||||
* @param user List of user object
|
||||
* @return void
|
||||
*/
|
||||
fun createUsersWithArrayInput(body: kotlin.Array<User>) : Unit {
|
||||
val localVariableBody: kotlin.Any? = body
|
||||
fun createUsersWithArrayInput(user: kotlin.Array<User>) : Unit {
|
||||
val localVariableBody: kotlin.Any? = user
|
||||
val localVariableQuery: MultiValueMap = mapOf()
|
||||
val localVariableHeaders: kotlin.collections.Map<kotlin.String,kotlin.String> = mapOf()
|
||||
val localVariableConfig = RequestConfig(
|
||||
@@ -82,11 +82,11 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object
|
||||
* @param user List of user object
|
||||
* @return void
|
||||
*/
|
||||
fun createUsersWithListInput(body: kotlin.Array<User>) : Unit {
|
||||
val localVariableBody: kotlin.Any? = body
|
||||
fun createUsersWithListInput(user: kotlin.Array<User>) : Unit {
|
||||
val localVariableBody: kotlin.Any? = user
|
||||
val localVariableQuery: MultiValueMap = mapOf()
|
||||
val localVariableHeaders: kotlin.collections.Map<kotlin.String,kotlin.String> = mapOf()
|
||||
val localVariableConfig = RequestConfig(
|
||||
@@ -240,11 +240,11 @@ class UserApi(basePath: kotlin.String = "http://petstore.swagger.io/v2") : ApiCl
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted
|
||||
* @param body Updated user object
|
||||
* @param user Updated user object
|
||||
* @return void
|
||||
*/
|
||||
fun updateUser(username: kotlin.String, body: User) : Unit {
|
||||
val localVariableBody: kotlin.Any? = body
|
||||
fun updateUser(username: kotlin.String, user: User) : Unit {
|
||||
val localVariableBody: kotlin.Any? = user
|
||||
val localVariableQuery: MultiValueMap = mapOf()
|
||||
val localVariableHeaders: kotlin.collections.Map<kotlin.String,kotlin.String> = mapOf()
|
||||
val localVariableConfig = RequestConfig(
|
||||
|
||||
Reference in New Issue
Block a user