forked from loafle/openapi-generator-original
fix bug with parcelable
This commit is contained in:
parent
0844496bad
commit
8ce8082f7f
33
bin/java-petstore-okhttp-gson-parcelable.sh
Executable file
33
bin/java-petstore-okhttp-gson-parcelable.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -t modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson-parcelableModel -DhideGenerationTimestamp=true,parcelableModel=true"
|
||||||
|
|
||||||
|
rm -rf samples/client/petstore/java/okhttp-gson/src/main
|
||||||
|
find samples/client/petstore/java/okhttp-gson -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
@ -74,8 +74,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen {
|
|||||||
this.setUseRxJava(Boolean.valueOf(additionalProperties.get(USE_RX_JAVA).toString()));
|
this.setUseRxJava(Boolean.valueOf(additionalProperties.get(USE_RX_JAVA).toString()));
|
||||||
}
|
}
|
||||||
if (additionalProperties.containsKey(PARCELABLE_MODEL)) {
|
if (additionalProperties.containsKey(PARCELABLE_MODEL)) {
|
||||||
this.setParcelableModels(Boolean.valueOf(additionalProperties.get(PARCELABLE_MODEL).toString()));
|
this.setParcelableModel(Boolean.valueOf(additionalProperties.get(PARCELABLE_MODEL).toString()));
|
||||||
}
|
}
|
||||||
|
// put the boolean value back to PARCELABLE_MODEL in additionalProperties
|
||||||
|
additionalProperties.put(PARCELABLE_MODEL, parcelableModel);
|
||||||
|
|
||||||
final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/");
|
final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/");
|
||||||
final String authFolder = (sourceFolder + '/' + invokerPackage + ".auth").replace(".", "/");
|
final String authFolder = (sourceFolder + '/' + invokerPackage + ".auth").replace(".", "/");
|
||||||
@ -223,7 +225,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen {
|
|||||||
this.useRxJava = useRxJava;
|
this.useRxJava = useRxJava;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParcelableModels(boolean parcelableModel) {
|
public void setParcelableModel(boolean parcelableModel) {
|
||||||
this.parcelableModel = parcelableModel;
|
this.parcelableModel = parcelableModel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,14 @@ import java.util.Objects;
|
|||||||
{{#imports}}
|
{{#imports}}
|
||||||
import {{import}};
|
import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
{{#serializableModel}}
|
||||||
|
import java.io.Serializable;
|
||||||
|
{{/serializableModel}}
|
||||||
|
{{#parcelableModel}}
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
{{/parcelableModel}}
|
||||||
|
|
||||||
{{#serializableModel}}import java.io.Serializable;{{/serializableModel}}
|
|
||||||
{{#parcelableModel}}import android.os.Parcelable;
|
|
||||||
import android.os.Parcel;{{/parcelableModel}}
|
|
||||||
{{#models}}
|
{{#models}}
|
||||||
{{#model}}
|
{{#model}}
|
||||||
{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>pojo}}{{/isEnum}}
|
{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>pojo}}{{/isEnum}}
|
||||||
|
@ -0,0 +1,183 @@
|
|||||||
|
# swagger-petstore-okhttp-gson
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
To install the API client library to your local Maven repository, simply execute:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mvn install
|
||||||
|
```
|
||||||
|
|
||||||
|
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mvn deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
|
||||||
|
|
||||||
|
### Maven users
|
||||||
|
|
||||||
|
Add this dependency to your project's POM:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>swagger-petstore-okhttp-gson</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Gradle users
|
||||||
|
|
||||||
|
Add this dependency to your project's build file:
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
compile "io.swagger:swagger-petstore-okhttp-gson:1.0.0"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Others
|
||||||
|
|
||||||
|
At first generate the JAR by executing:
|
||||||
|
|
||||||
|
mvn package
|
||||||
|
|
||||||
|
Then manually install the following JARs:
|
||||||
|
|
||||||
|
* target/swagger-petstore-okhttp-gson-1.0.0.jar
|
||||||
|
* target/lib/*.jar
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Please follow the [installation](#installation) instruction and execute the following Java code:
|
||||||
|
|
||||||
|
```java
|
||||||
|
|
||||||
|
import io.swagger.client.*;
|
||||||
|
import io.swagger.client.auth.*;
|
||||||
|
import io.swagger.client.model.*;
|
||||||
|
import io.swagger.client.api.FakeApi;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class FakeApiExample {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
FakeApi apiInstance = new FakeApi();
|
||||||
|
BigDecimal number = new BigDecimal(); // BigDecimal | None
|
||||||
|
Double _double = 3.4D; // Double | None
|
||||||
|
String string = "string_example"; // String | None
|
||||||
|
byte[] _byte = B; // byte[] | None
|
||||||
|
Integer integer = 56; // Integer | None
|
||||||
|
Integer int32 = 56; // Integer | None
|
||||||
|
Long int64 = 789L; // Long | None
|
||||||
|
Float _float = 3.4F; // Float | None
|
||||||
|
byte[] binary = B; // byte[] | None
|
||||||
|
LocalDate date = new LocalDate(); // LocalDate | None
|
||||||
|
DateTime dateTime = new DateTime(); // DateTime | None
|
||||||
|
String password = "password_example"; // String | None
|
||||||
|
try {
|
||||||
|
apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
|
||||||
|
Class | Method | HTTP request | Description
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*FakeApi* | [**testEnumQueryParameters**](docs/FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters
|
||||||
|
*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||||
|
*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||||
|
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||||
|
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||||
|
*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||||
|
*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||||
|
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||||
|
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
|
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||||
|
*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||||
|
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||||
|
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||||
|
*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
|
||||||
|
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||||
|
*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||||
|
*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||||
|
*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||||
|
*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||||
|
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||||
|
*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation for Models
|
||||||
|
|
||||||
|
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
|
- [Animal](docs/Animal.md)
|
||||||
|
- [AnimalFarm](docs/AnimalFarm.md)
|
||||||
|
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
|
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
|
- [ArrayTest](docs/ArrayTest.md)
|
||||||
|
- [Cat](docs/Cat.md)
|
||||||
|
- [Category](docs/Category.md)
|
||||||
|
- [Dog](docs/Dog.md)
|
||||||
|
- [EnumClass](docs/EnumClass.md)
|
||||||
|
- [EnumTest](docs/EnumTest.md)
|
||||||
|
- [FormatTest](docs/FormatTest.md)
|
||||||
|
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||||
|
- [MapTest](docs/MapTest.md)
|
||||||
|
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||||
|
- [Model200Response](docs/Model200Response.md)
|
||||||
|
- [ModelApiResponse](docs/ModelApiResponse.md)
|
||||||
|
- [ModelReturn](docs/ModelReturn.md)
|
||||||
|
- [Name](docs/Name.md)
|
||||||
|
- [NumberOnly](docs/NumberOnly.md)
|
||||||
|
- [Order](docs/Order.md)
|
||||||
|
- [Pet](docs/Pet.md)
|
||||||
|
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
|
- [SpecialModelName](docs/SpecialModelName.md)
|
||||||
|
- [Tag](docs/Tag.md)
|
||||||
|
- [User](docs/User.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation for Authorization
|
||||||
|
|
||||||
|
Authentication schemes defined for the API:
|
||||||
|
### api_key
|
||||||
|
|
||||||
|
- **Type**: API key
|
||||||
|
- **API key parameter name**: api_key
|
||||||
|
- **Location**: HTTP header
|
||||||
|
|
||||||
|
### petstore_auth
|
||||||
|
|
||||||
|
- **Type**: OAuth
|
||||||
|
- **Flow**: implicit
|
||||||
|
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||||
|
- **Scopes**:
|
||||||
|
- write:pets: modify pets in your account
|
||||||
|
- read:pets: read your pets
|
||||||
|
|
||||||
|
|
||||||
|
## Recommendation
|
||||||
|
|
||||||
|
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue.
|
||||||
|
|
||||||
|
## Author
|
||||||
|
|
||||||
|
apiteam@swagger.io
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# AdditionalPropertiesClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**mapProperty** | **Map<String, String>** | | [optional]
|
||||||
|
**mapOfMapProperty** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# Animal
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**className** | **String** | |
|
||||||
|
**color** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# AnimalFarm
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# ArrayOfArrayOfNumberOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**arrayArrayNumber** | [**List<List<BigDecimal>>**](List.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# ArrayOfNumberOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**arrayNumber** | [**List<BigDecimal>**](BigDecimal.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
# ArrayTest
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**arrayOfString** | **List<String>** | | [optional]
|
||||||
|
**arrayArrayOfInteger** | [**List<List<Long>>**](List.md) | | [optional]
|
||||||
|
**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
# Cat
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**className** | **String** | |
|
||||||
|
**color** | **String** | | [optional]
|
||||||
|
**declawed** | **Boolean** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# Category
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **Long** | | [optional]
|
||||||
|
**name** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
# Dog
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**className** | **String** | |
|
||||||
|
**color** | **String** | | [optional]
|
||||||
|
**breed** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
# EnumClass
|
||||||
|
|
||||||
|
## Enum
|
||||||
|
|
||||||
|
|
||||||
|
* `_ABC` (value: `"_abc"`)
|
||||||
|
|
||||||
|
* `_EFG` (value: `"-efg"`)
|
||||||
|
|
||||||
|
* `_XYZ_` (value: `"(xyz)"`)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
# EnumTest
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
|
||||||
|
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
|
||||||
|
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
<a name="EnumStringEnum"></a>
|
||||||
|
## Enum: EnumStringEnum
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
UPPER | "UPPER"
|
||||||
|
LOWER | "lower"
|
||||||
|
|
||||||
|
|
||||||
|
<a name="EnumIntegerEnum"></a>
|
||||||
|
## Enum: EnumIntegerEnum
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
NUMBER_1 | 1
|
||||||
|
NUMBER_MINUS_1 | -1
|
||||||
|
|
||||||
|
|
||||||
|
<a name="EnumNumberEnum"></a>
|
||||||
|
## Enum: EnumNumberEnum
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
NUMBER_1_DOT_1 | 1.1
|
||||||
|
NUMBER_MINUS_1_DOT_2 | -1.2
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,122 @@
|
|||||||
|
# FakeApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
[**testEnumQueryParameters**](FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters
|
||||||
|
|
||||||
|
|
||||||
|
<a name="testEndpointParameters"></a>
|
||||||
|
# **testEndpointParameters**
|
||||||
|
> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
|
||||||
|
|
||||||
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.FakeApi;
|
||||||
|
|
||||||
|
|
||||||
|
FakeApi apiInstance = new FakeApi();
|
||||||
|
BigDecimal number = new BigDecimal(); // BigDecimal | None
|
||||||
|
Double _double = 3.4D; // Double | None
|
||||||
|
String string = "string_example"; // String | None
|
||||||
|
byte[] _byte = B; // byte[] | None
|
||||||
|
Integer integer = 56; // Integer | None
|
||||||
|
Integer int32 = 56; // Integer | None
|
||||||
|
Long int64 = 789L; // Long | None
|
||||||
|
Float _float = 3.4F; // Float | None
|
||||||
|
byte[] binary = B; // byte[] | None
|
||||||
|
LocalDate date = new LocalDate(); // LocalDate | None
|
||||||
|
DateTime dateTime = new DateTime(); // DateTime | None
|
||||||
|
String password = "password_example"; // String | None
|
||||||
|
try {
|
||||||
|
apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**number** | **BigDecimal**| None |
|
||||||
|
**_double** | **Double**| None |
|
||||||
|
**string** | **String**| None |
|
||||||
|
**_byte** | **byte[]**| None |
|
||||||
|
**integer** | **Integer**| None | [optional]
|
||||||
|
**int32** | **Integer**| None | [optional]
|
||||||
|
**int64** | **Long**| None | [optional]
|
||||||
|
**_float** | **Float**| None | [optional]
|
||||||
|
**binary** | **byte[]**| None | [optional]
|
||||||
|
**date** | **LocalDate**| None | [optional]
|
||||||
|
**dateTime** | **DateTime**| None | [optional]
|
||||||
|
**password** | **String**| None | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
|
||||||
|
- **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
|
||||||
|
|
||||||
|
<a name="testEnumQueryParameters"></a>
|
||||||
|
# **testEnumQueryParameters**
|
||||||
|
> testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble)
|
||||||
|
|
||||||
|
To test enum query parameters
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.FakeApi;
|
||||||
|
|
||||||
|
|
||||||
|
FakeApi apiInstance = new FakeApi();
|
||||||
|
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
|
||||||
|
BigDecimal enumQueryInteger = new BigDecimal(); // BigDecimal | Query parameter enum test (double)
|
||||||
|
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
|
||||||
|
try {
|
||||||
|
apiInstance.testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling FakeApi#testEnumQueryParameters");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
|
||||||
|
**enumQueryInteger** | **BigDecimal**| Query parameter enum test (double) | [optional]
|
||||||
|
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
# FormatTest
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**integer** | **Integer** | | [optional]
|
||||||
|
**int32** | **Integer** | | [optional]
|
||||||
|
**int64** | **Long** | | [optional]
|
||||||
|
**number** | [**BigDecimal**](BigDecimal.md) | |
|
||||||
|
**_float** | **Float** | | [optional]
|
||||||
|
**_double** | **Double** | | [optional]
|
||||||
|
**string** | **String** | | [optional]
|
||||||
|
**_byte** | **byte[]** | |
|
||||||
|
**binary** | **byte[]** | | [optional]
|
||||||
|
**date** | [**LocalDate**](LocalDate.md) | |
|
||||||
|
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
|
||||||
|
**uuid** | **String** | | [optional]
|
||||||
|
**password** | **String** | |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# HasOnlyReadOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**bar** | **String** | | [optional]
|
||||||
|
**foo** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
# MapTest
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||||
|
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
<a name="Map<String, InnerEnum>"></a>
|
||||||
|
## Enum: Map<String, InnerEnum>
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
# MixedPropertiesAndAdditionalPropertiesClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**uuid** | **String** | | [optional]
|
||||||
|
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
|
||||||
|
**map** | [**Map<String, Animal>**](Animal.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# Model200Response
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **Integer** | | [optional]
|
||||||
|
**PropertyClass** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
# ModelApiResponse
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**code** | **Integer** | | [optional]
|
||||||
|
**type** | **String** | | [optional]
|
||||||
|
**message** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# ModelReturn
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**_return** | **Integer** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# Name
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **Integer** | |
|
||||||
|
**snakeCase** | **Integer** | | [optional]
|
||||||
|
**property** | **String** | | [optional]
|
||||||
|
**_123Number** | **Integer** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# NumberOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
# Order
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **Long** | | [optional]
|
||||||
|
**petId** | **Long** | | [optional]
|
||||||
|
**quantity** | **Integer** | | [optional]
|
||||||
|
**shipDate** | [**DateTime**](DateTime.md) | | [optional]
|
||||||
|
**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional]
|
||||||
|
**complete** | **Boolean** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
<a name="StatusEnum"></a>
|
||||||
|
## Enum: StatusEnum
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
PLACED | "placed"
|
||||||
|
APPROVED | "approved"
|
||||||
|
DELIVERED | "delivered"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
# Pet
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **Long** | | [optional]
|
||||||
|
**category** | [**Category**](Category.md) | | [optional]
|
||||||
|
**name** | **String** | |
|
||||||
|
**photoUrls** | **List<String>** | |
|
||||||
|
**tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||||
|
**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
<a name="StatusEnum"></a>
|
||||||
|
## Enum: StatusEnum
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
AVAILABLE | "available"
|
||||||
|
PENDING | "pending"
|
||||||
|
SOLD | "sold"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,448 @@
|
|||||||
|
# PetApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||||
|
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||||
|
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||||
|
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||||
|
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||||
|
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||||
|
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||||
|
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
|
|
||||||
|
|
||||||
|
<a name="addPet"></a>
|
||||||
|
# **addPet**
|
||||||
|
> addPet(body)
|
||||||
|
|
||||||
|
Add a new pet to the store
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure OAuth2 access token for authorization: petstore_auth
|
||||||
|
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||||
|
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi();
|
||||||
|
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
|
try {
|
||||||
|
apiInstance.addPet(body);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PetApi#addPet");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json, application/xml
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="deletePet"></a>
|
||||||
|
# **deletePet**
|
||||||
|
> deletePet(petId, apiKey)
|
||||||
|
|
||||||
|
Deletes a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure OAuth2 access token for authorization: petstore_auth
|
||||||
|
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||||
|
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi();
|
||||||
|
Long petId = 789L; // Long | Pet id to delete
|
||||||
|
String apiKey = "apiKey_example"; // String |
|
||||||
|
try {
|
||||||
|
apiInstance.deletePet(petId, apiKey);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PetApi#deletePet");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**petId** | **Long**| Pet id to delete |
|
||||||
|
**apiKey** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="findPetsByStatus"></a>
|
||||||
|
# **findPetsByStatus**
|
||||||
|
> List<Pet> findPetsByStatus(status)
|
||||||
|
|
||||||
|
Finds Pets by status
|
||||||
|
|
||||||
|
Multiple status values can be provided with comma separated strings
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure OAuth2 access token for authorization: petstore_auth
|
||||||
|
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||||
|
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi();
|
||||||
|
List<String> status = Arrays.asList("status_example"); // List<String> | Status values that need to be considered for filter
|
||||||
|
try {
|
||||||
|
List<Pet> result = apiInstance.findPetsByStatus(status);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PetApi#findPetsByStatus");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**List<Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="findPetsByTags"></a>
|
||||||
|
# **findPetsByTags**
|
||||||
|
> List<Pet> findPetsByTags(tags)
|
||||||
|
|
||||||
|
Finds Pets by tags
|
||||||
|
|
||||||
|
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure OAuth2 access token for authorization: petstore_auth
|
||||||
|
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||||
|
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi();
|
||||||
|
List<String> tags = Arrays.asList("tags_example"); // List<String> | Tags to filter by
|
||||||
|
try {
|
||||||
|
List<Pet> result = apiInstance.findPetsByTags(tags);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PetApi#findPetsByTags");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**tags** | [**List<String>**](String.md)| Tags to filter by |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**List<Pet>**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="getPetById"></a>
|
||||||
|
# **getPetById**
|
||||||
|
> Pet getPetById(petId)
|
||||||
|
|
||||||
|
Find pet by ID
|
||||||
|
|
||||||
|
Returns a single pet
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure API key authorization: api_key
|
||||||
|
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||||
|
api_key.setApiKey("YOUR API KEY");
|
||||||
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
|
//api_key.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi();
|
||||||
|
Long petId = 789L; // Long | ID of pet to return
|
||||||
|
try {
|
||||||
|
Pet result = apiInstance.getPetById(petId);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PetApi#getPetById");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**petId** | **Long**| ID of pet to return |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Pet**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="updatePet"></a>
|
||||||
|
# **updatePet**
|
||||||
|
> updatePet(body)
|
||||||
|
|
||||||
|
Update an existing pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure OAuth2 access token for authorization: petstore_auth
|
||||||
|
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||||
|
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi();
|
||||||
|
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
|
try {
|
||||||
|
apiInstance.updatePet(body);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PetApi#updatePet");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json, application/xml
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="updatePetWithForm"></a>
|
||||||
|
# **updatePetWithForm**
|
||||||
|
> updatePetWithForm(petId, name, status)
|
||||||
|
|
||||||
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure OAuth2 access token for authorization: petstore_auth
|
||||||
|
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||||
|
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi();
|
||||||
|
Long petId = 789L; // Long | ID of pet that needs to be updated
|
||||||
|
String name = "name_example"; // String | Updated name of the pet
|
||||||
|
String status = "status_example"; // String | Updated status of the pet
|
||||||
|
try {
|
||||||
|
apiInstance.updatePetWithForm(petId, name, status);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PetApi#updatePetWithForm");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**petId** | **Long**| ID of pet that needs to be updated |
|
||||||
|
**name** | **String**| Updated name of the pet | [optional]
|
||||||
|
**status** | **String**| Updated status of the pet | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="uploadFile"></a>
|
||||||
|
# **uploadFile**
|
||||||
|
> ModelApiResponse uploadFile(petId, additionalMetadata, file)
|
||||||
|
|
||||||
|
uploads an image
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure OAuth2 access token for authorization: petstore_auth
|
||||||
|
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||||
|
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||||
|
|
||||||
|
PetApi apiInstance = new PetApi();
|
||||||
|
Long petId = 789L; // Long | ID of pet to update
|
||||||
|
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||||
|
File file = new File("/path/to/file.txt"); // File | file to upload
|
||||||
|
try {
|
||||||
|
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PetApi#uploadFile");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**petId** | **Long**| ID of pet to update |
|
||||||
|
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||||
|
**file** | **File**| file to upload | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**ModelApiResponse**](ModelApiResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: multipart/form-data
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# ReadOnlyFirst
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**bar** | **String** | | [optional]
|
||||||
|
**baz** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# SpecialModelName
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**specialPropertyName** | **Long** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,197 @@
|
|||||||
|
# StoreApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||||
|
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||||
|
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||||
|
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
|
<a name="deleteOrder"></a>
|
||||||
|
# **deleteOrder**
|
||||||
|
> deleteOrder(orderId)
|
||||||
|
|
||||||
|
Delete purchase order by ID
|
||||||
|
|
||||||
|
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
|
|
||||||
|
StoreApi apiInstance = new StoreApi();
|
||||||
|
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
||||||
|
try {
|
||||||
|
apiInstance.deleteOrder(orderId);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling StoreApi#deleteOrder");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**orderId** | **String**| ID of the order that needs to be deleted |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="getInventory"></a>
|
||||||
|
# **getInventory**
|
||||||
|
> Map<String, Integer> getInventory()
|
||||||
|
|
||||||
|
Returns pet inventories by status
|
||||||
|
|
||||||
|
Returns a map of status codes to quantities
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiClient;
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.Configuration;
|
||||||
|
//import io.swagger.client.auth.*;
|
||||||
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
|
// Configure API key authorization: api_key
|
||||||
|
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||||
|
api_key.setApiKey("YOUR API KEY");
|
||||||
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
|
//api_key.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
|
StoreApi apiInstance = new StoreApi();
|
||||||
|
try {
|
||||||
|
Map<String, Integer> result = apiInstance.getInventory();
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling StoreApi#getInventory");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Map<String, Integer>**](Map.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
<a name="getOrderById"></a>
|
||||||
|
# **getOrderById**
|
||||||
|
> Order getOrderById(orderId)
|
||||||
|
|
||||||
|
Find purchase order by ID
|
||||||
|
|
||||||
|
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
|
|
||||||
|
StoreApi apiInstance = new StoreApi();
|
||||||
|
Long orderId = 789L; // Long | ID of pet that needs to be fetched
|
||||||
|
try {
|
||||||
|
Order result = apiInstance.getOrderById(orderId);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling StoreApi#getOrderById");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**orderId** | **Long**| ID of pet that needs to be fetched |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Order**](Order.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="placeOrder"></a>
|
||||||
|
# **placeOrder**
|
||||||
|
> Order placeOrder(body)
|
||||||
|
|
||||||
|
Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
|
|
||||||
|
StoreApi apiInstance = new StoreApi();
|
||||||
|
Order body = new Order(); // Order | order placed for purchasing the pet
|
||||||
|
try {
|
||||||
|
Order result = apiInstance.placeOrder(body);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling StoreApi#placeOrder");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Order**](Order.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# Tag
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **Long** | | [optional]
|
||||||
|
**name** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
# User
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **Long** | | [optional]
|
||||||
|
**username** | **String** | | [optional]
|
||||||
|
**firstName** | **String** | | [optional]
|
||||||
|
**lastName** | **String** | | [optional]
|
||||||
|
**email** | **String** | | [optional]
|
||||||
|
**password** | **String** | | [optional]
|
||||||
|
**phone** | **String** | | [optional]
|
||||||
|
**userStatus** | **Integer** | User Status | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,370 @@
|
|||||||
|
# UserApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
|
||||||
|
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||||
|
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||||
|
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||||
|
[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||||
|
[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||||
|
[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||||
|
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
|
<a name="createUser"></a>
|
||||||
|
# **createUser**
|
||||||
|
> createUser(body)
|
||||||
|
|
||||||
|
Create user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi();
|
||||||
|
User body = new User(); // User | Created user object
|
||||||
|
try {
|
||||||
|
apiInstance.createUser(body);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling UserApi#createUser");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="createUsersWithArrayInput"></a>
|
||||||
|
# **createUsersWithArrayInput**
|
||||||
|
> createUsersWithArrayInput(body)
|
||||||
|
|
||||||
|
Creates list of users with given input array
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi();
|
||||||
|
List<User> body = Arrays.asList(new User()); // List<User> | List of user object
|
||||||
|
try {
|
||||||
|
apiInstance.createUsersWithArrayInput(body);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**List<User>**](User.md)| List of user object |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="createUsersWithListInput"></a>
|
||||||
|
# **createUsersWithListInput**
|
||||||
|
> createUsersWithListInput(body)
|
||||||
|
|
||||||
|
Creates list of users with given input array
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi();
|
||||||
|
List<User> body = Arrays.asList(new User()); // List<User> | List of user object
|
||||||
|
try {
|
||||||
|
apiInstance.createUsersWithListInput(body);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**List<User>**](User.md)| List of user object |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="deleteUser"></a>
|
||||||
|
# **deleteUser**
|
||||||
|
> deleteUser(username)
|
||||||
|
|
||||||
|
Delete user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi();
|
||||||
|
String username = "username_example"; // String | The name that needs to be deleted
|
||||||
|
try {
|
||||||
|
apiInstance.deleteUser(username);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling UserApi#deleteUser");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**username** | **String**| The name that needs to be deleted |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="getUserByName"></a>
|
||||||
|
# **getUserByName**
|
||||||
|
> User getUserByName(username)
|
||||||
|
|
||||||
|
Get user by user name
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi();
|
||||||
|
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||||
|
try {
|
||||||
|
User result = apiInstance.getUserByName(username);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling UserApi#getUserByName");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**User**](User.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="loginUser"></a>
|
||||||
|
# **loginUser**
|
||||||
|
> String loginUser(username, password)
|
||||||
|
|
||||||
|
Logs user into the system
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi();
|
||||||
|
String username = "username_example"; // String | The user name for login
|
||||||
|
String password = "password_example"; // String | The password for login in clear text
|
||||||
|
try {
|
||||||
|
String result = apiInstance.loginUser(username, password);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling UserApi#loginUser");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**username** | **String**| The user name for login |
|
||||||
|
**password** | **String**| The password for login in clear text |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="logoutUser"></a>
|
||||||
|
# **logoutUser**
|
||||||
|
> logoutUser()
|
||||||
|
|
||||||
|
Logs out current logged in user session
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi();
|
||||||
|
try {
|
||||||
|
apiInstance.logoutUser();
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling UserApi#logoutUser");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
<a name="updateUser"></a>
|
||||||
|
# **updateUser**
|
||||||
|
> updateUser(username, body)
|
||||||
|
|
||||||
|
Updated user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
//import io.swagger.client.ApiException;
|
||||||
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
|
|
||||||
|
UserApi apiInstance = new UserApi();
|
||||||
|
String username = "username_example"; // String | name that need to be deleted
|
||||||
|
User body = new User(); // User | Updated user object
|
||||||
|
try {
|
||||||
|
apiInstance.updateUser(username, body);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling UserApi#updateUser");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**username** | **String**| name that need to be deleted |
|
||||||
|
**body** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
BIN
samples/client/petstore/java/okhttp-gson-parcelableModel/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
samples/client/petstore/java/okhttp-gson-parcelableModel/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
#Tue May 17 23:08:05 CST 2016
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
|
@ -32,13 +32,14 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AdditionalPropertiesClass
|
* AdditionalPropertiesClass
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class AdditionalPropertiesClass {
|
public class AdditionalPropertiesClass implements Parcelable {
|
||||||
@SerializedName("map_property")
|
@SerializedName("map_property")
|
||||||
private Map<String, String> mapProperty = new HashMap<String, String>();
|
private Map<String, String> mapProperty = new HashMap<String, String>();
|
||||||
|
|
||||||
@ -131,5 +132,35 @@ public class AdditionalPropertiesClass {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(mapProperty);
|
||||||
|
|
||||||
|
out.writeValue(mapOfMapProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AdditionalPropertiesClass() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
AdditionalPropertiesClass(Parcel in) {
|
||||||
|
|
||||||
|
mapProperty = (Map<String, String>)in.readValue(null);
|
||||||
|
mapOfMapProperty = (Map<String, Map<String, String>>)in.readValue(Map.class.getClassLoader());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<AdditionalPropertiesClass> CREATOR = new Parcelable.Creator<AdditionalPropertiesClass>() {
|
||||||
|
public AdditionalPropertiesClass createFromParcel(Parcel in) {
|
||||||
|
return new AdditionalPropertiesClass(in);
|
||||||
|
}
|
||||||
|
public AdditionalPropertiesClass[] newArray(int size) {
|
||||||
|
return new AdditionalPropertiesClass[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Animal
|
* Animal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Animal {
|
public class Animal implements Parcelable {
|
||||||
@SerializedName("className")
|
@SerializedName("className")
|
||||||
private String className = null;
|
private String className = null;
|
||||||
|
|
||||||
@ -118,5 +119,35 @@ public class Animal {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(className);
|
||||||
|
|
||||||
|
out.writeValue(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Animal() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Animal(Parcel in) {
|
||||||
|
|
||||||
|
className = (String)in.readValue(null);
|
||||||
|
color = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Animal> CREATOR = new Parcelable.Creator<Animal>() {
|
||||||
|
public Animal createFromParcel(Parcel in) {
|
||||||
|
return new Animal(in);
|
||||||
|
}
|
||||||
|
public Animal[] newArray(int size) {
|
||||||
|
return new Animal[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.client.model.Animal;
|
import io.swagger.client.model.Animal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AnimalFarm
|
* AnimalFarm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class AnimalFarm extends ArrayList<Animal> {
|
public class AnimalFarm extends ArrayList<Animal> implements Parcelable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -72,5 +73,29 @@ public class AnimalFarm extends ArrayList<Animal> {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
super.writeToParcel(out, flags); }
|
||||||
|
|
||||||
|
public AnimalFarm() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
AnimalFarm(Parcel in) {
|
||||||
|
super(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<AnimalFarm> CREATOR = new Parcelable.Creator<AnimalFarm>() {
|
||||||
|
public AnimalFarm createFromParcel(Parcel in) {
|
||||||
|
return new AnimalFarm(in);
|
||||||
|
}
|
||||||
|
public AnimalFarm[] newArray(int size) {
|
||||||
|
return new AnimalFarm[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -32,13 +32,14 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfArrayOfNumberOnly
|
* ArrayOfArrayOfNumberOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ArrayOfArrayOfNumberOnly {
|
public class ArrayOfArrayOfNumberOnly implements Parcelable {
|
||||||
@SerializedName("ArrayArrayNumber")
|
@SerializedName("ArrayArrayNumber")
|
||||||
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
|
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
|
||||||
|
|
||||||
@ -103,5 +104,32 @@ public class ArrayOfArrayOfNumberOnly {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(arrayArrayNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayOfArrayOfNumberOnly() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayOfArrayOfNumberOnly(Parcel in) {
|
||||||
|
|
||||||
|
arrayArrayNumber = (List<List<BigDecimal>>)in.readValue(List.class.getClassLoader());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<ArrayOfArrayOfNumberOnly> CREATOR = new Parcelable.Creator<ArrayOfArrayOfNumberOnly>() {
|
||||||
|
public ArrayOfArrayOfNumberOnly createFromParcel(Parcel in) {
|
||||||
|
return new ArrayOfArrayOfNumberOnly(in);
|
||||||
|
}
|
||||||
|
public ArrayOfArrayOfNumberOnly[] newArray(int size) {
|
||||||
|
return new ArrayOfArrayOfNumberOnly[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -32,13 +32,14 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfNumberOnly
|
* ArrayOfNumberOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ArrayOfNumberOnly {
|
public class ArrayOfNumberOnly implements Parcelable {
|
||||||
@SerializedName("ArrayNumber")
|
@SerializedName("ArrayNumber")
|
||||||
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
|
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
|
||||||
|
|
||||||
@ -103,5 +104,32 @@ public class ArrayOfNumberOnly {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(arrayNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayOfNumberOnly() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayOfNumberOnly(Parcel in) {
|
||||||
|
|
||||||
|
arrayNumber = (List<BigDecimal>)in.readValue(BigDecimal.class.getClassLoader());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<ArrayOfNumberOnly> CREATOR = new Parcelable.Creator<ArrayOfNumberOnly>() {
|
||||||
|
public ArrayOfNumberOnly createFromParcel(Parcel in) {
|
||||||
|
return new ArrayOfNumberOnly(in);
|
||||||
|
}
|
||||||
|
public ArrayOfNumberOnly[] newArray(int size) {
|
||||||
|
return new ArrayOfNumberOnly[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -32,13 +32,14 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import io.swagger.client.model.ReadOnlyFirst;
|
import io.swagger.client.model.ReadOnlyFirst;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayTest
|
* ArrayTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ArrayTest {
|
public class ArrayTest implements Parcelable {
|
||||||
@SerializedName("array_of_string")
|
@SerializedName("array_of_string")
|
||||||
private List<String> arrayOfString = new ArrayList<String>();
|
private List<String> arrayOfString = new ArrayList<String>();
|
||||||
|
|
||||||
@ -159,5 +160,38 @@ public class ArrayTest {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(arrayOfString);
|
||||||
|
|
||||||
|
out.writeValue(arrayArrayOfInteger);
|
||||||
|
|
||||||
|
out.writeValue(arrayArrayOfModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayTest() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayTest(Parcel in) {
|
||||||
|
|
||||||
|
arrayOfString = (List<String>)in.readValue(null);
|
||||||
|
arrayArrayOfInteger = (List<List<Long>>)in.readValue(List.class.getClassLoader());
|
||||||
|
arrayArrayOfModel = (List<List<ReadOnlyFirst>>)in.readValue(List.class.getClassLoader());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<ArrayTest> CREATOR = new Parcelable.Creator<ArrayTest>() {
|
||||||
|
public ArrayTest createFromParcel(Parcel in) {
|
||||||
|
return new ArrayTest(in);
|
||||||
|
}
|
||||||
|
public ArrayTest[] newArray(int size) {
|
||||||
|
return new ArrayTest[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -30,13 +30,21 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.client.model.Animal;
|
import io.swagger.client.model.Animal;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal implements Parcelable {
|
||||||
|
@SerializedName("className")
|
||||||
|
private String className = null;
|
||||||
|
|
||||||
|
@SerializedName("color")
|
||||||
|
private String color = "red";
|
||||||
|
|
||||||
|
>>>>>>> fix bug with parcelable:samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java
|
||||||
@SerializedName("declawed")
|
@SerializedName("declawed")
|
||||||
private Boolean declawed = null;
|
private Boolean declawed = null;
|
||||||
|
|
||||||
@ -97,5 +105,38 @@ public class Cat extends Animal {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
super.writeToParcel(out, flags);
|
||||||
|
out.writeValue(className);
|
||||||
|
|
||||||
|
out.writeValue(color);
|
||||||
|
|
||||||
|
out.writeValue(declawed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cat() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Cat(Parcel in) {
|
||||||
|
super(in);
|
||||||
|
className = (String)in.readValue(null);
|
||||||
|
color = (String)in.readValue(null);
|
||||||
|
declawed = (Boolean)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Cat> CREATOR = new Parcelable.Creator<Cat>() {
|
||||||
|
public Cat createFromParcel(Parcel in) {
|
||||||
|
return new Cat(in);
|
||||||
|
}
|
||||||
|
public Cat[] newArray(int size) {
|
||||||
|
return new Cat[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Category
|
* Category
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Category {
|
public class Category implements Parcelable {
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
|
||||||
@ -118,5 +119,35 @@ public class Category {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(id);
|
||||||
|
|
||||||
|
out.writeValue(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Category() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Category(Parcel in) {
|
||||||
|
|
||||||
|
id = (Long)in.readValue(null);
|
||||||
|
name = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Category> CREATOR = new Parcelable.Creator<Category>() {
|
||||||
|
public Category createFromParcel(Parcel in) {
|
||||||
|
return new Category(in);
|
||||||
|
}
|
||||||
|
public Category[] newArray(int size) {
|
||||||
|
return new Category[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -30,13 +30,21 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.client.model.Animal;
|
import io.swagger.client.model.Animal;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal implements Parcelable {
|
||||||
|
@SerializedName("className")
|
||||||
|
private String className = null;
|
||||||
|
|
||||||
|
@SerializedName("color")
|
||||||
|
private String color = "red";
|
||||||
|
|
||||||
|
>>>>>>> fix bug with parcelable:samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java
|
||||||
@SerializedName("breed")
|
@SerializedName("breed")
|
||||||
private String breed = null;
|
private String breed = null;
|
||||||
|
|
||||||
@ -97,5 +105,38 @@ public class Dog extends Animal {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
super.writeToParcel(out, flags);
|
||||||
|
out.writeValue(className);
|
||||||
|
|
||||||
|
out.writeValue(color);
|
||||||
|
|
||||||
|
out.writeValue(breed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dog() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Dog(Parcel in) {
|
||||||
|
super(in);
|
||||||
|
className = (String)in.readValue(null);
|
||||||
|
color = (String)in.readValue(null);
|
||||||
|
breed = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Dog> CREATOR = new Parcelable.Creator<Dog>() {
|
||||||
|
public Dog createFromParcel(Parcel in) {
|
||||||
|
return new Dog(in);
|
||||||
|
}
|
||||||
|
public Dog[] newArray(int size) {
|
||||||
|
return new Dog[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -27,7 +27,8 @@ package io.swagger.client.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumTest
|
* EnumTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class EnumTest {
|
public class EnumTest implements Parcelable {
|
||||||
/**
|
/**
|
||||||
* Gets or Sets enumString
|
* Gets or Sets enumString
|
||||||
*/
|
*/
|
||||||
@ -207,5 +208,38 @@ public class EnumTest {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(enumString);
|
||||||
|
|
||||||
|
out.writeValue(enumInteger);
|
||||||
|
|
||||||
|
out.writeValue(enumNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumTest() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
EnumTest(Parcel in) {
|
||||||
|
|
||||||
|
enumString = (EnumStringEnum)in.readValue(null);
|
||||||
|
enumInteger = (EnumIntegerEnum)in.readValue(null);
|
||||||
|
enumNumber = (EnumNumberEnum)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<EnumTest> CREATOR = new Parcelable.Creator<EnumTest>() {
|
||||||
|
public EnumTest createFromParcel(Parcel in) {
|
||||||
|
return new EnumTest(in);
|
||||||
|
}
|
||||||
|
public EnumTest[] newArray(int size) {
|
||||||
|
return new EnumTest[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -32,13 +32,14 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FormatTest
|
* FormatTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FormatTest {
|
public class FormatTest implements Parcelable {
|
||||||
@SerializedName("integer")
|
@SerializedName("integer")
|
||||||
private Integer integer = null;
|
private Integer integer = null;
|
||||||
|
|
||||||
@ -384,5 +385,68 @@ public class FormatTest {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(integer);
|
||||||
|
|
||||||
|
out.writeValue(int32);
|
||||||
|
|
||||||
|
out.writeValue(int64);
|
||||||
|
|
||||||
|
out.writeValue(number);
|
||||||
|
|
||||||
|
out.writeValue(_float);
|
||||||
|
|
||||||
|
out.writeValue(_double);
|
||||||
|
|
||||||
|
out.writeValue(string);
|
||||||
|
|
||||||
|
out.writeValue(_byte);
|
||||||
|
|
||||||
|
out.writeValue(binary);
|
||||||
|
|
||||||
|
out.writeValue(date);
|
||||||
|
|
||||||
|
out.writeValue(dateTime);
|
||||||
|
|
||||||
|
out.writeValue(uuid);
|
||||||
|
|
||||||
|
out.writeValue(password);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FormatTest() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
FormatTest(Parcel in) {
|
||||||
|
|
||||||
|
integer = (Integer)in.readValue(null);
|
||||||
|
int32 = (Integer)in.readValue(null);
|
||||||
|
int64 = (Long)in.readValue(null);
|
||||||
|
number = (BigDecimal)in.readValue(null);
|
||||||
|
_float = (Float)in.readValue(null);
|
||||||
|
_double = (Double)in.readValue(null);
|
||||||
|
string = (String)in.readValue(null);
|
||||||
|
_byte = (byte[])in.readValue(null);
|
||||||
|
binary = (byte[])in.readValue(null);
|
||||||
|
date = (LocalDate)in.readValue(null);
|
||||||
|
dateTime = (DateTime)in.readValue(null);
|
||||||
|
uuid = (String)in.readValue(null);
|
||||||
|
password = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<FormatTest> CREATOR = new Parcelable.Creator<FormatTest>() {
|
||||||
|
public FormatTest createFromParcel(Parcel in) {
|
||||||
|
return new FormatTest(in);
|
||||||
|
}
|
||||||
|
public FormatTest[] newArray(int size) {
|
||||||
|
return new FormatTest[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HasOnlyReadOnly
|
* HasOnlyReadOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class HasOnlyReadOnly {
|
public class HasOnlyReadOnly implements Parcelable {
|
||||||
@SerializedName("bar")
|
@SerializedName("bar")
|
||||||
private String bar = null;
|
private String bar = null;
|
||||||
|
|
||||||
@ -100,5 +101,35 @@ public class HasOnlyReadOnly {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(bar);
|
||||||
|
|
||||||
|
out.writeValue(foo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public HasOnlyReadOnly() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
HasOnlyReadOnly(Parcel in) {
|
||||||
|
|
||||||
|
bar = (String)in.readValue(null);
|
||||||
|
foo = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<HasOnlyReadOnly> CREATOR = new Parcelable.Creator<HasOnlyReadOnly>() {
|
||||||
|
public HasOnlyReadOnly createFromParcel(Parcel in) {
|
||||||
|
return new HasOnlyReadOnly(in);
|
||||||
|
}
|
||||||
|
public HasOnlyReadOnly[] newArray(int size) {
|
||||||
|
return new HasOnlyReadOnly[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -32,13 +32,14 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MapTest {
|
public class MapTest implements Parcelable {
|
||||||
@SerializedName("map_map_of_string")
|
@SerializedName("map_map_of_string")
|
||||||
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
|
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
|
||||||
|
|
||||||
@ -153,5 +154,35 @@ public class MapTest {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(mapMapOfString);
|
||||||
|
|
||||||
|
out.writeValue(mapOfEnumString);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MapTest() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
MapTest(Parcel in) {
|
||||||
|
|
||||||
|
mapMapOfString = (Map<String, Map<String, String>>)in.readValue(Map.class.getClassLoader());
|
||||||
|
mapOfEnumString = (Map<String, InnerEnum>)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<MapTest> CREATOR = new Parcelable.Creator<MapTest>() {
|
||||||
|
public MapTest createFromParcel(Parcel in) {
|
||||||
|
return new MapTest(in);
|
||||||
|
}
|
||||||
|
public MapTest[] newArray(int size) {
|
||||||
|
return new MapTest[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -34,13 +34,14 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MixedPropertiesAndAdditionalPropertiesClass
|
* MixedPropertiesAndAdditionalPropertiesClass
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MixedPropertiesAndAdditionalPropertiesClass {
|
public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable {
|
||||||
@SerializedName("uuid")
|
@SerializedName("uuid")
|
||||||
private String uuid = null;
|
private String uuid = null;
|
||||||
|
|
||||||
@ -151,5 +152,38 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(uuid);
|
||||||
|
|
||||||
|
out.writeValue(dateTime);
|
||||||
|
|
||||||
|
out.writeValue(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
MixedPropertiesAndAdditionalPropertiesClass(Parcel in) {
|
||||||
|
|
||||||
|
uuid = (String)in.readValue(null);
|
||||||
|
dateTime = (DateTime)in.readValue(null);
|
||||||
|
map = (Map<String, Animal>)in.readValue(Animal.class.getClassLoader());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<MixedPropertiesAndAdditionalPropertiesClass> CREATOR = new Parcelable.Creator<MixedPropertiesAndAdditionalPropertiesClass>() {
|
||||||
|
public MixedPropertiesAndAdditionalPropertiesClass createFromParcel(Parcel in) {
|
||||||
|
return new MixedPropertiesAndAdditionalPropertiesClass(in);
|
||||||
|
}
|
||||||
|
public MixedPropertiesAndAdditionalPropertiesClass[] newArray(int size) {
|
||||||
|
return new MixedPropertiesAndAdditionalPropertiesClass[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,14 +29,15 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name starting with number
|
* Model for testing model name starting with number
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "Model for testing model name starting with number")
|
@ApiModel(description = "Model for testing model name starting with number")
|
||||||
|
|
||||||
public class Model200Response {
|
public class Model200Response implements Parcelable {
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
|
||||||
@ -119,5 +120,35 @@ public class Model200Response {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(name);
|
||||||
|
|
||||||
|
out.writeValue(PropertyClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Model200Response() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Model200Response(Parcel in) {
|
||||||
|
|
||||||
|
name = (Integer)in.readValue(null);
|
||||||
|
PropertyClass = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Model200Response> CREATOR = new Parcelable.Creator<Model200Response>() {
|
||||||
|
public Model200Response createFromParcel(Parcel in) {
|
||||||
|
return new Model200Response(in);
|
||||||
|
}
|
||||||
|
public Model200Response[] newArray(int size) {
|
||||||
|
return new Model200Response[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ModelApiResponse
|
* ModelApiResponse
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse implements Parcelable {
|
||||||
@SerializedName("code")
|
@SerializedName("code")
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
|
|
||||||
@ -141,5 +142,38 @@ public class ModelApiResponse {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(code);
|
||||||
|
|
||||||
|
out.writeValue(type);
|
||||||
|
|
||||||
|
out.writeValue(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModelApiResponse() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
ModelApiResponse(Parcel in) {
|
||||||
|
|
||||||
|
code = (Integer)in.readValue(null);
|
||||||
|
type = (String)in.readValue(null);
|
||||||
|
message = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<ModelApiResponse> CREATOR = new Parcelable.Creator<ModelApiResponse>() {
|
||||||
|
public ModelApiResponse createFromParcel(Parcel in) {
|
||||||
|
return new ModelApiResponse(in);
|
||||||
|
}
|
||||||
|
public ModelApiResponse[] newArray(int size) {
|
||||||
|
return new ModelApiResponse[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,14 +29,15 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing reserved words
|
* Model for testing reserved words
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "Model for testing reserved words")
|
@ApiModel(description = "Model for testing reserved words")
|
||||||
|
|
||||||
public class ModelReturn {
|
public class ModelReturn implements Parcelable {
|
||||||
@SerializedName("return")
|
@SerializedName("return")
|
||||||
private Integer _return = null;
|
private Integer _return = null;
|
||||||
|
|
||||||
@ -96,5 +97,32 @@ public class ModelReturn {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(_return);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModelReturn() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
ModelReturn(Parcel in) {
|
||||||
|
|
||||||
|
_return = (Integer)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<ModelReturn> CREATOR = new Parcelable.Creator<ModelReturn>() {
|
||||||
|
public ModelReturn createFromParcel(Parcel in) {
|
||||||
|
return new ModelReturn(in);
|
||||||
|
}
|
||||||
|
public ModelReturn[] newArray(int size) {
|
||||||
|
return new ModelReturn[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,14 +29,15 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name same as property name
|
* Model for testing model name same as property name
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "Model for testing model name same as property name")
|
@ApiModel(description = "Model for testing model name same as property name")
|
||||||
|
|
||||||
public class Name {
|
public class Name implements Parcelable {
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
|
||||||
@ -147,5 +148,41 @@ public class Name {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(name);
|
||||||
|
|
||||||
|
out.writeValue(snakeCase);
|
||||||
|
|
||||||
|
out.writeValue(property);
|
||||||
|
|
||||||
|
out.writeValue(_123Number);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Name() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Name(Parcel in) {
|
||||||
|
|
||||||
|
name = (Integer)in.readValue(null);
|
||||||
|
snakeCase = (Integer)in.readValue(null);
|
||||||
|
property = (String)in.readValue(null);
|
||||||
|
_123Number = (Integer)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Name> CREATOR = new Parcelable.Creator<Name>() {
|
||||||
|
public Name createFromParcel(Parcel in) {
|
||||||
|
return new Name(in);
|
||||||
|
}
|
||||||
|
public Name[] newArray(int size) {
|
||||||
|
return new Name[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -30,13 +30,14 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NumberOnly
|
* NumberOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class NumberOnly {
|
public class NumberOnly implements Parcelable {
|
||||||
@SerializedName("JustNumber")
|
@SerializedName("JustNumber")
|
||||||
private BigDecimal justNumber = null;
|
private BigDecimal justNumber = null;
|
||||||
|
|
||||||
@ -96,5 +97,32 @@ public class NumberOnly {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(justNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NumberOnly() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
NumberOnly(Parcel in) {
|
||||||
|
|
||||||
|
justNumber = (BigDecimal)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<NumberOnly> CREATOR = new Parcelable.Creator<NumberOnly>() {
|
||||||
|
public NumberOnly createFromParcel(Parcel in) {
|
||||||
|
return new NumberOnly(in);
|
||||||
|
}
|
||||||
|
public NumberOnly[] newArray(int size) {
|
||||||
|
return new NumberOnly[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -30,13 +30,14 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order
|
* Order
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Order {
|
public class Order implements Parcelable {
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
|
||||||
@ -236,5 +237,47 @@ public class Order {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(id);
|
||||||
|
|
||||||
|
out.writeValue(petId);
|
||||||
|
|
||||||
|
out.writeValue(quantity);
|
||||||
|
|
||||||
|
out.writeValue(shipDate);
|
||||||
|
|
||||||
|
out.writeValue(status);
|
||||||
|
|
||||||
|
out.writeValue(complete);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Order() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Order(Parcel in) {
|
||||||
|
|
||||||
|
id = (Long)in.readValue(null);
|
||||||
|
petId = (Long)in.readValue(null);
|
||||||
|
quantity = (Integer)in.readValue(null);
|
||||||
|
shipDate = (DateTime)in.readValue(null);
|
||||||
|
status = (StatusEnum)in.readValue(null);
|
||||||
|
complete = (Boolean)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Order> CREATOR = new Parcelable.Creator<Order>() {
|
||||||
|
public Order createFromParcel(Parcel in) {
|
||||||
|
return new Order(in);
|
||||||
|
}
|
||||||
|
public Order[] newArray(int size) {
|
||||||
|
return new Order[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -33,13 +33,14 @@ import io.swagger.client.model.Category;
|
|||||||
import io.swagger.client.model.Tag;
|
import io.swagger.client.model.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pet
|
* Pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Pet {
|
public class Pet implements Parcelable {
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
|
||||||
@ -249,5 +250,47 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(id);
|
||||||
|
|
||||||
|
out.writeValue(category);
|
||||||
|
|
||||||
|
out.writeValue(name);
|
||||||
|
|
||||||
|
out.writeValue(photoUrls);
|
||||||
|
|
||||||
|
out.writeValue(tags);
|
||||||
|
|
||||||
|
out.writeValue(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Pet(Parcel in) {
|
||||||
|
|
||||||
|
id = (Long)in.readValue(null);
|
||||||
|
category = (Category)in.readValue(null);
|
||||||
|
name = (String)in.readValue(null);
|
||||||
|
photoUrls = (List<String>)in.readValue(null);
|
||||||
|
tags = (List<Tag>)in.readValue(Tag.class.getClassLoader());
|
||||||
|
status = (StatusEnum)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Pet> CREATOR = new Parcelable.Creator<Pet>() {
|
||||||
|
public Pet createFromParcel(Parcel in) {
|
||||||
|
return new Pet(in);
|
||||||
|
}
|
||||||
|
public Pet[] newArray(int size) {
|
||||||
|
return new Pet[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ReadOnlyFirst
|
* ReadOnlyFirst
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ReadOnlyFirst {
|
public class ReadOnlyFirst implements Parcelable {
|
||||||
@SerializedName("bar")
|
@SerializedName("bar")
|
||||||
private String bar = null;
|
private String bar = null;
|
||||||
|
|
||||||
@ -109,5 +110,35 @@ public class ReadOnlyFirst {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(bar);
|
||||||
|
|
||||||
|
out.writeValue(baz);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReadOnlyFirst() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
ReadOnlyFirst(Parcel in) {
|
||||||
|
|
||||||
|
bar = (String)in.readValue(null);
|
||||||
|
baz = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<ReadOnlyFirst> CREATOR = new Parcelable.Creator<ReadOnlyFirst>() {
|
||||||
|
public ReadOnlyFirst createFromParcel(Parcel in) {
|
||||||
|
return new ReadOnlyFirst(in);
|
||||||
|
}
|
||||||
|
public ReadOnlyFirst[] newArray(int size) {
|
||||||
|
return new ReadOnlyFirst[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SpecialModelName
|
* SpecialModelName
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SpecialModelName {
|
public class SpecialModelName implements Parcelable {
|
||||||
@SerializedName("$special[property.name]")
|
@SerializedName("$special[property.name]")
|
||||||
private Long specialPropertyName = null;
|
private Long specialPropertyName = null;
|
||||||
|
|
||||||
@ -95,5 +96,32 @@ public class SpecialModelName {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(specialPropertyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpecialModelName() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
SpecialModelName(Parcel in) {
|
||||||
|
|
||||||
|
specialPropertyName = (Long)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<SpecialModelName> CREATOR = new Parcelable.Creator<SpecialModelName>() {
|
||||||
|
public SpecialModelName createFromParcel(Parcel in) {
|
||||||
|
return new SpecialModelName(in);
|
||||||
|
}
|
||||||
|
public SpecialModelName[] newArray(int size) {
|
||||||
|
return new SpecialModelName[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag
|
* Tag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Tag {
|
public class Tag implements Parcelable {
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
|
||||||
@ -118,5 +119,35 @@ public class Tag {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(id);
|
||||||
|
|
||||||
|
out.writeValue(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Tag() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
Tag(Parcel in) {
|
||||||
|
|
||||||
|
id = (Long)in.readValue(null);
|
||||||
|
name = (String)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<Tag> CREATOR = new Parcelable.Creator<Tag>() {
|
||||||
|
public Tag createFromParcel(Parcel in) {
|
||||||
|
return new Tag(in);
|
||||||
|
}
|
||||||
|
public Tag[] newArray(int size) {
|
||||||
|
return new Tag[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -29,13 +29,14 @@ import java.util.Objects;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User
|
* User
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class User {
|
public class User implements Parcelable {
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
|
||||||
@ -256,5 +257,53 @@ public class User {
|
|||||||
}
|
}
|
||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
|
||||||
|
out.writeValue(id);
|
||||||
|
|
||||||
|
out.writeValue(username);
|
||||||
|
|
||||||
|
out.writeValue(firstName);
|
||||||
|
|
||||||
|
out.writeValue(lastName);
|
||||||
|
|
||||||
|
out.writeValue(email);
|
||||||
|
|
||||||
|
out.writeValue(password);
|
||||||
|
|
||||||
|
out.writeValue(phone);
|
||||||
|
|
||||||
|
out.writeValue(userStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
public User() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
User(Parcel in) {
|
||||||
|
|
||||||
|
id = (Long)in.readValue(null);
|
||||||
|
username = (String)in.readValue(null);
|
||||||
|
firstName = (String)in.readValue(null);
|
||||||
|
lastName = (String)in.readValue(null);
|
||||||
|
email = (String)in.readValue(null);
|
||||||
|
password = (String)in.readValue(null);
|
||||||
|
phone = (String)in.readValue(null);
|
||||||
|
userStatus = (Integer)in.readValue(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {
|
||||||
|
public User createFromParcel(Parcel in) {
|
||||||
|
return new User(in);
|
||||||
|
}
|
||||||
|
public User[] newArray(int size) {
|
||||||
|
return new User[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,92 @@
|
|||||||
|
/**
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import org.joda.time.LocalDate;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for FakeApi
|
||||||
|
*/
|
||||||
|
public class FakeApiTest {
|
||||||
|
|
||||||
|
private final FakeApi api = new FakeApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEndpointParametersTest() throws ApiException {
|
||||||
|
BigDecimal number = null;
|
||||||
|
Double _double = null;
|
||||||
|
String string = null;
|
||||||
|
byte[] _byte = null;
|
||||||
|
Integer integer = null;
|
||||||
|
Integer int32 = null;
|
||||||
|
Long int64 = null;
|
||||||
|
Float _float = null;
|
||||||
|
byte[] binary = null;
|
||||||
|
LocalDate date = null;
|
||||||
|
DateTime dateTime = null;
|
||||||
|
String password = null;
|
||||||
|
// api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To test enum query parameters
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testEnumQueryParametersTest() throws ApiException {
|
||||||
|
String enumQueryString = null;
|
||||||
|
BigDecimal enumQueryInteger = null;
|
||||||
|
Double enumQueryDouble = null;
|
||||||
|
// api.testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,180 @@
|
|||||||
|
/**
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.Pet;
|
||||||
|
import java.io.File;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PetApi
|
||||||
|
*/
|
||||||
|
public class PetApiTest {
|
||||||
|
|
||||||
|
private final PetApi api = new PetApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new pet to the store
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void addPetTest() throws ApiException {
|
||||||
|
Pet body = null;
|
||||||
|
// api.addPet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deletePetTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String apiKey = null;
|
||||||
|
// api.deletePet(petId, apiKey);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by status
|
||||||
|
*
|
||||||
|
* Multiple status values can be provided with comma separated strings
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByStatusTest() throws ApiException {
|
||||||
|
List<String> status = null;
|
||||||
|
// List<Pet> response = api.findPetsByStatus(status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds Pets by tags
|
||||||
|
*
|
||||||
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findPetsByTagsTest() throws ApiException {
|
||||||
|
List<String> tags = null;
|
||||||
|
// List<Pet> response = api.findPetsByTags(tags);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find pet by ID
|
||||||
|
*
|
||||||
|
* Returns a single pet
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPetByIdTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
// Pet response = api.getPetById(petId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an existing pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetTest() throws ApiException {
|
||||||
|
Pet body = null;
|
||||||
|
// api.updatePet(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePetWithFormTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String name = null;
|
||||||
|
String status = null;
|
||||||
|
// api.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void uploadFileTest() throws ApiException {
|
||||||
|
Long petId = null;
|
||||||
|
String additionalMetadata = null;
|
||||||
|
File file = null;
|
||||||
|
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
/**
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.Order;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for StoreApi
|
||||||
|
*/
|
||||||
|
public class StoreApiTest {
|
||||||
|
|
||||||
|
private final StoreApi api = new StoreApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteOrderTest() throws ApiException {
|
||||||
|
String orderId = null;
|
||||||
|
// api.deleteOrder(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns pet inventories by status
|
||||||
|
*
|
||||||
|
* Returns a map of status codes to quantities
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getInventoryTest() throws ApiException {
|
||||||
|
// Map<String, Integer> response = api.getInventory();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find purchase order by ID
|
||||||
|
*
|
||||||
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getOrderByIdTest() throws ApiException {
|
||||||
|
Long orderId = null;
|
||||||
|
// Order response = api.getOrderById(orderId);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Place an order for a pet
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void placeOrderTest() throws ApiException {
|
||||||
|
Order body = null;
|
||||||
|
// Order response = api.placeOrder(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,174 @@
|
|||||||
|
/**
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package io.swagger.client.api;
|
||||||
|
|
||||||
|
import io.swagger.client.ApiException;
|
||||||
|
import io.swagger.client.model.User;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for UserApi
|
||||||
|
*/
|
||||||
|
public class UserApiTest {
|
||||||
|
|
||||||
|
private final UserApi api = new UserApi();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUserTest() throws ApiException {
|
||||||
|
User body = null;
|
||||||
|
// api.createUser(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithArrayInputTest() throws ApiException {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates list of users with given input array
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createUsersWithListInputTest() throws ApiException {
|
||||||
|
List<User> body = null;
|
||||||
|
// api.createUsersWithListInput(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
// api.deleteUser(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getUserByNameTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
// User response = api.getUserByName(username);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs user into the system
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void loginUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
String password = null;
|
||||||
|
// String response = api.loginUser(username, password);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs out current logged in user session
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void logoutUserTest() throws ApiException {
|
||||||
|
// api.logoutUser();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updated user
|
||||||
|
*
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
* if the Api call fails
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateUserTest() throws ApiException {
|
||||||
|
String username = null;
|
||||||
|
User body = null;
|
||||||
|
// api.updateUser(username, body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user