mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
[JAVA] 4709: codegen with parcelableMode fails to build if using arrays in swagger. (#7867)
This commit is contained in:
parent
f943332d62
commit
f023327558
@ -67,6 +67,19 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
|
||||
{{/isContainer}}
|
||||
|
||||
{{/vars}}
|
||||
{{#parcelableModel}}
|
||||
public {{classname}}() {
|
||||
{{#parent}}
|
||||
super();
|
||||
{{/parent}}
|
||||
{{#gson}}
|
||||
{{#discriminator}}
|
||||
this.{{discriminator}} = this.getClass().getSimpleName();
|
||||
{{/discriminator}}
|
||||
{{/gson}}
|
||||
}
|
||||
{{/parcelableModel}}
|
||||
{{^parcelableModel}}
|
||||
{{#gson}}
|
||||
{{#discriminator}}
|
||||
public {{classname}}() {
|
||||
@ -74,6 +87,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
|
||||
}
|
||||
{{/discriminator}}
|
||||
{{/gson}}
|
||||
{{/parcelableModel}}
|
||||
{{#vars}}
|
||||
{{^isReadOnly}}
|
||||
public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) {
|
||||
@ -203,27 +217,41 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
{{#parcelableModel}}
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
{{#parent}} super.writeToParcel(out, flags); {{/parent}} {{#vars}}
|
||||
out.writeValue({{name}});
|
||||
{{/vars}}
|
||||
}
|
||||
{{#parcelableModel}}
|
||||
|
||||
public {{classname}}() {
|
||||
super();
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
{{#model}}
|
||||
{{#isArrayModel}}
|
||||
out.writeList(this);
|
||||
{{/isArrayModel}}
|
||||
{{^isArrayModel}}
|
||||
{{#parent}}
|
||||
super.writeToParcel(out, flags);
|
||||
{{/parent}}
|
||||
{{#vars}}
|
||||
out.writeValue({{name}});
|
||||
{{/vars}}
|
||||
{{/isArrayModel}}
|
||||
{{/model}}
|
||||
}
|
||||
|
||||
{{classname}}(Parcel in) {
|
||||
{{#parent}} super(in); {{/parent}}
|
||||
{{#vars}}
|
||||
{{#isPrimitiveType}}
|
||||
{{#isArrayModel}}
|
||||
in.readTypedList(this, {{arrayModelType}}.CREATOR);
|
||||
{{/isArrayModel}}
|
||||
{{^isArrayModel}}
|
||||
{{#parent}}
|
||||
super(in);
|
||||
{{/parent}}
|
||||
{{#vars}}
|
||||
{{#isPrimitiveType}}
|
||||
{{name}} = ({{{datatypeWithEnum}}})in.readValue(null);
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader());
|
||||
{{/isPrimitiveType}}
|
||||
{{/vars}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/vars}}
|
||||
{{/isArrayModel}}
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
@ -232,11 +260,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
|
||||
|
||||
public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() {
|
||||
public {{classname}} createFromParcel(Parcel in) {
|
||||
{{#model}}
|
||||
{{#isArrayModel}}
|
||||
{{classname}} result = new {{classname}}();
|
||||
result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader()));
|
||||
return result;
|
||||
{{/isArrayModel}}
|
||||
{{^isArrayModel}}
|
||||
return new {{classname}}(in);
|
||||
{{/isArrayModel}}
|
||||
{{/model}}
|
||||
}
|
||||
public {{classname}}[] newArray(int size) {
|
||||
return new {{classname}}[size];
|
||||
}
|
||||
};
|
||||
{{/parcelableModel}}
|
||||
{{/parcelableModel}}
|
||||
}
|
||||
|
@ -1,24 +1,35 @@
|
||||
# swagger-petstore-okhttp-gson
|
||||
|
||||
Swagger Petstore
|
||||
- API version: 1.0.0
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
|
||||
*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
|
||||
Building the API client library requires:
|
||||
1. Java 1.7+
|
||||
2. Maven/Gradle
|
||||
|
||||
## Installation
|
||||
|
||||
To install the API client library to your local Maven repository, simply execute:
|
||||
|
||||
```shell
|
||||
mvn install
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
|
||||
|
||||
```shell
|
||||
mvn deploy
|
||||
mvn clean deploy
|
||||
```
|
||||
|
||||
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
|
||||
Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
|
||||
|
||||
### Maven users
|
||||
|
||||
@ -26,10 +37,10 @@ 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>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-petstore-okhttp-gson</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@ -45,12 +56,14 @@ compile "io.swagger:swagger-petstore-okhttp-gson:1.0.0"
|
||||
|
||||
At first generate the JAR by executing:
|
||||
|
||||
mvn package
|
||||
```shell
|
||||
mvn clean package
|
||||
```
|
||||
|
||||
Then manually install the following JARs:
|
||||
|
||||
* target/swagger-petstore-okhttp-gson-1.0.0.jar
|
||||
* target/lib/*.jar
|
||||
* `target/swagger-petstore-okhttp-gson-1.0.0.jar`
|
||||
* `target/lib/*.jar`
|
||||
|
||||
## Getting Started
|
||||
|
||||
@ -61,22 +74,22 @@ Please follow the [installation](#installation) instruction and execute the foll
|
||||
import io.swagger.client.*;
|
||||
import io.swagger.client.auth.*;
|
||||
import io.swagger.client.model.*;
|
||||
import io.swagger.client.api.FakeApi;
|
||||
import io.swagger.client.api.AnotherFakeApi;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
public class FakeApiExample {
|
||||
public class AnotherFakeApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Boolean body = true; // Boolean | Input boolean as post body
|
||||
AnotherFakeApi apiInstance = new AnotherFakeApi();
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
|
||||
Client result = apiInstance.testSpecialTags(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
|
||||
System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -90,6 +103,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
@ -97,6 +111,9 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*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
|
||||
@ -164,6 +181,12 @@ Authentication schemes defined for the API:
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
### api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
@ -5,6 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
|
||||
**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | |
|
||||
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
|
||||
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
|
||||
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||
@ -19,6 +20,15 @@ LOWER | "lower"
|
||||
EMPTY | ""
|
||||
|
||||
|
||||
<a name="EnumStringRequiredEnum"></a>
|
||||
## Enum: EnumStringRequiredEnum
|
||||
Name | Value
|
||||
---- | -----
|
||||
UPPER | "UPPER"
|
||||
LOWER | "lower"
|
||||
EMPTY | ""
|
||||
|
||||
|
||||
<a name="EnumIntegerEnum"></a>
|
||||
## Enum: EnumIntegerEnum
|
||||
Name | Value
|
||||
|
@ -40,6 +40,8 @@ public class AdditionalPropertiesClass implements Parcelable {
|
||||
@SerializedName("map_of_map_property")
|
||||
private Map<String, Map<String, String>> mapOfMapProperty = null;
|
||||
|
||||
public AdditionalPropertiesClass() {
|
||||
}
|
||||
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
|
||||
this.mapProperty = mapProperty;
|
||||
return this;
|
||||
@ -134,19 +136,13 @@ public class AdditionalPropertiesClass implements Parcelable {
|
||||
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());
|
||||
}
|
||||
|
@ -119,19 +119,13 @@ public class Animal implements Parcelable {
|
||||
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);
|
||||
}
|
||||
|
@ -26,6 +26,9 @@ import android.os.Parcel;
|
||||
*/
|
||||
|
||||
public class AnimalFarm extends ArrayList<Animal> implements Parcelable {
|
||||
public AnimalFarm() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@ -64,15 +67,13 @@ public class AnimalFarm extends ArrayList<Animal> implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
super.writeToParcel(out, flags); }
|
||||
|
||||
public AnimalFarm() {
|
||||
super();
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeList(this);
|
||||
}
|
||||
|
||||
AnimalFarm(Parcel in) {
|
||||
super(in);
|
||||
in.readTypedList(this, Animal.CREATOR);
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
@ -81,7 +82,9 @@ public class AnimalFarm extends ArrayList<Animal> implements Parcelable {
|
||||
|
||||
public static final Parcelable.Creator<AnimalFarm> CREATOR = new Parcelable.Creator<AnimalFarm>() {
|
||||
public AnimalFarm createFromParcel(Parcel in) {
|
||||
return new AnimalFarm(in);
|
||||
AnimalFarm result = new AnimalFarm();
|
||||
result.addAll(in.readArrayList(Animal.class.getClassLoader()));
|
||||
return result;
|
||||
}
|
||||
public AnimalFarm[] newArray(int size) {
|
||||
return new AnimalFarm[size];
|
||||
|
@ -37,6 +37,8 @@ public class ArrayOfArrayOfNumberOnly implements Parcelable {
|
||||
@SerializedName("ArrayArrayNumber")
|
||||
private List<List<BigDecimal>> arrayArrayNumber = null;
|
||||
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
}
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
this.arrayArrayNumber = arrayArrayNumber;
|
||||
return this;
|
||||
@ -103,17 +105,12 @@ public class ArrayOfArrayOfNumberOnly implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,8 @@ public class ArrayOfNumberOnly implements Parcelable {
|
||||
@SerializedName("ArrayNumber")
|
||||
private List<BigDecimal> arrayNumber = null;
|
||||
|
||||
public ArrayOfNumberOnly() {
|
||||
}
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
this.arrayNumber = arrayNumber;
|
||||
return this;
|
||||
@ -103,17 +105,12 @@ public class ArrayOfNumberOnly implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeValue(arrayNumber);
|
||||
}
|
||||
|
||||
public ArrayOfNumberOnly() {
|
||||
super();
|
||||
}
|
||||
|
||||
ArrayOfNumberOnly(Parcel in) {
|
||||
|
||||
arrayNumber = (List<BigDecimal>)in.readValue(BigDecimal.class.getClassLoader());
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,8 @@ public class ArrayTest implements Parcelable {
|
||||
@SerializedName("array_array_of_model")
|
||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
|
||||
|
||||
public ArrayTest() {
|
||||
}
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
this.arrayOfString = arrayOfString;
|
||||
return this;
|
||||
@ -165,21 +167,14 @@ public class ArrayTest implements Parcelable {
|
||||
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());
|
||||
|
@ -49,6 +49,8 @@ public class Capitalization implements Parcelable {
|
||||
@SerializedName("ATT_NAME")
|
||||
private String ATT_NAME = null;
|
||||
|
||||
public Capitalization() {
|
||||
}
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
this.smallCamel = smallCamel;
|
||||
return this;
|
||||
@ -207,27 +209,17 @@ public class Capitalization implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
out.writeValue(smallCamel);
|
||||
|
||||
out.writeValue(capitalCamel);
|
||||
|
||||
out.writeValue(smallSnake);
|
||||
|
||||
out.writeValue(capitalSnake);
|
||||
|
||||
out.writeValue(scAETHFlowPoints);
|
||||
|
||||
out.writeValue(ATT_NAME);
|
||||
}
|
||||
|
||||
public Capitalization() {
|
||||
super();
|
||||
}
|
||||
|
||||
Capitalization(Parcel in) {
|
||||
|
||||
smallCamel = (String)in.readValue(null);
|
||||
capitalCamel = (String)in.readValue(null);
|
||||
smallSnake = (String)in.readValue(null);
|
||||
|
@ -35,6 +35,9 @@ public class Cat extends Animal implements Parcelable {
|
||||
@SerializedName("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat() {
|
||||
super();
|
||||
}
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -94,17 +97,14 @@ public class Cat extends Animal implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
super.writeToParcel(out, flags);
|
||||
super.writeToParcel(out, flags);
|
||||
out.writeValue(declawed);
|
||||
}
|
||||
|
||||
public Cat() {
|
||||
super();
|
||||
}
|
||||
|
||||
Cat(Parcel in) {
|
||||
super(in);
|
||||
super(in);
|
||||
declawed = (Boolean)in.readValue(null);
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,8 @@ public class Category implements Parcelable {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
public Category() {
|
||||
}
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
@ -115,19 +117,13 @@ public class Category implements Parcelable {
|
||||
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);
|
||||
}
|
||||
|
@ -35,6 +35,8 @@ public class ClassModel implements Parcelable {
|
||||
@SerializedName("_class")
|
||||
private String propertyClass = null;
|
||||
|
||||
public ClassModel() {
|
||||
}
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
this.propertyClass = propertyClass;
|
||||
return this;
|
||||
@ -93,17 +95,12 @@ public class ClassModel implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeValue(propertyClass);
|
||||
}
|
||||
|
||||
public ClassModel() {
|
||||
super();
|
||||
}
|
||||
|
||||
ClassModel(Parcel in) {
|
||||
|
||||
propertyClass = (String)in.readValue(null);
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,8 @@ public class Client implements Parcelable {
|
||||
@SerializedName("client")
|
||||
private String client = null;
|
||||
|
||||
public Client() {
|
||||
}
|
||||
public Client client(String client) {
|
||||
this.client = client;
|
||||
return this;
|
||||
@ -92,17 +94,12 @@ public class Client implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeValue(client);
|
||||
}
|
||||
|
||||
public Client() {
|
||||
super();
|
||||
}
|
||||
|
||||
Client(Parcel in) {
|
||||
|
||||
client = (String)in.readValue(null);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,9 @@ public class Dog extends Animal implements Parcelable {
|
||||
@SerializedName("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog() {
|
||||
super();
|
||||
}
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -94,17 +97,14 @@ public class Dog extends Animal implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
super.writeToParcel(out, flags);
|
||||
super.writeToParcel(out, flags);
|
||||
out.writeValue(breed);
|
||||
}
|
||||
|
||||
public Dog() {
|
||||
super();
|
||||
}
|
||||
|
||||
Dog(Parcel in) {
|
||||
super(in);
|
||||
super(in);
|
||||
breed = (String)in.readValue(null);
|
||||
}
|
||||
|
||||
|
@ -133,6 +133,8 @@ public class EnumArrays implements Parcelable {
|
||||
@SerializedName("array_enum")
|
||||
private List<ArrayEnumEnum> arrayEnum = null;
|
||||
|
||||
public EnumArrays() {
|
||||
}
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
this.justSymbol = justSymbol;
|
||||
return this;
|
||||
@ -219,19 +221,13 @@ public class EnumArrays implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
out.writeValue(justSymbol);
|
||||
|
||||
out.writeValue(arrayEnum);
|
||||
}
|
||||
|
||||
public EnumArrays() {
|
||||
super();
|
||||
}
|
||||
|
||||
EnumArrays(Parcel in) {
|
||||
|
||||
justSymbol = (JustSymbolEnum)in.readValue(null);
|
||||
arrayEnum = (List<ArrayEnumEnum>)in.readValue(null);
|
||||
}
|
||||
|
@ -84,6 +84,58 @@ public class EnumTest implements Parcelable {
|
||||
@SerializedName("enum_string")
|
||||
private EnumStringEnum enumString = null;
|
||||
|
||||
/**
|
||||
* Gets or Sets enumStringRequired
|
||||
*/
|
||||
@JsonAdapter(EnumStringRequiredEnum.Adapter.class)
|
||||
public enum EnumStringRequiredEnum {
|
||||
UPPER("UPPER"),
|
||||
|
||||
LOWER("lower"),
|
||||
|
||||
EMPTY("");
|
||||
|
||||
private String value;
|
||||
|
||||
EnumStringRequiredEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static EnumStringRequiredEnum fromValue(String text) {
|
||||
for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(text)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringRequiredEnum> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final EnumStringRequiredEnum enumeration) throws IOException {
|
||||
jsonWriter.value(enumeration.getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOException {
|
||||
String value = jsonReader.nextString();
|
||||
return EnumStringRequiredEnum.fromValue(String.valueOf(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SerializedName("enum_string_required")
|
||||
private EnumStringRequiredEnum enumStringRequired = null;
|
||||
|
||||
/**
|
||||
* Gets or Sets enumInteger
|
||||
*/
|
||||
@ -187,6 +239,8 @@ public class EnumTest implements Parcelable {
|
||||
@SerializedName("outerEnum")
|
||||
private OuterEnum outerEnum = null;
|
||||
|
||||
public EnumTest() {
|
||||
}
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
this.enumString = enumString;
|
||||
return this;
|
||||
@ -205,6 +259,24 @@ public class EnumTest implements Parcelable {
|
||||
this.enumString = enumString;
|
||||
}
|
||||
|
||||
public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enumStringRequired
|
||||
* @return enumStringRequired
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public EnumStringRequiredEnum getEnumStringRequired() {
|
||||
return enumStringRequired;
|
||||
}
|
||||
|
||||
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
}
|
||||
|
||||
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
|
||||
this.enumInteger = enumInteger;
|
||||
return this;
|
||||
@ -270,6 +342,7 @@ public class EnumTest implements Parcelable {
|
||||
}
|
||||
EnumTest enumTest = (EnumTest) o;
|
||||
return Objects.equals(this.enumString, enumTest.enumString) &&
|
||||
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
|
||||
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
|
||||
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
|
||||
Objects.equals(this.outerEnum, enumTest.outerEnum);
|
||||
@ -277,7 +350,7 @@ public class EnumTest implements Parcelable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
|
||||
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
|
||||
}
|
||||
|
||||
|
||||
@ -287,6 +360,7 @@ public class EnumTest implements Parcelable {
|
||||
sb.append("class EnumTest {\n");
|
||||
|
||||
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
|
||||
sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
|
||||
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
|
||||
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
|
||||
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
|
||||
@ -305,24 +379,18 @@ public class EnumTest implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
out.writeValue(enumString);
|
||||
|
||||
out.writeValue(enumStringRequired);
|
||||
out.writeValue(enumInteger);
|
||||
|
||||
out.writeValue(enumNumber);
|
||||
|
||||
out.writeValue(outerEnum);
|
||||
}
|
||||
|
||||
public EnumTest() {
|
||||
super();
|
||||
}
|
||||
|
||||
EnumTest(Parcel in) {
|
||||
|
||||
enumString = (EnumStringEnum)in.readValue(null);
|
||||
enumStringRequired = (EnumStringRequiredEnum)in.readValue(null);
|
||||
enumInteger = (EnumIntegerEnum)in.readValue(null);
|
||||
enumNumber = (EnumNumberEnum)in.readValue(null);
|
||||
outerEnum = (OuterEnum)in.readValue(OuterEnum.class.getClassLoader());
|
||||
|
@ -74,6 +74,8 @@ public class FormatTest implements Parcelable {
|
||||
@SerializedName("password")
|
||||
private String password = null;
|
||||
|
||||
public FormatTest() {
|
||||
}
|
||||
public FormatTest integer(Integer integer) {
|
||||
this.integer = integer;
|
||||
return this;
|
||||
@ -382,41 +384,24 @@ public class FormatTest implements Parcelable {
|
||||
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);
|
||||
|
@ -37,6 +37,8 @@ public class HasOnlyReadOnly implements Parcelable {
|
||||
@SerializedName("foo")
|
||||
private String foo = null;
|
||||
|
||||
public HasOnlyReadOnly() {
|
||||
}
|
||||
/**
|
||||
* Get bar
|
||||
* @return bar
|
||||
@ -97,19 +99,13 @@ public class HasOnlyReadOnly implements Parcelable {
|
||||
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);
|
||||
}
|
||||
|
@ -87,6 +87,8 @@ public class MapTest implements Parcelable {
|
||||
@SerializedName("map_of_enum_string")
|
||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||
|
||||
public MapTest() {
|
||||
}
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
this.mapMapOfString = mapMapOfString;
|
||||
return this;
|
||||
@ -181,19 +183,13 @@ public class MapTest implements Parcelable {
|
||||
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);
|
||||
}
|
||||
|
@ -46,6 +46,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable {
|
||||
@SerializedName("map")
|
||||
private Map<String, Animal> map = null;
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
}
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
this.uuid = uuid;
|
||||
return this;
|
||||
@ -152,21 +154,14 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable {
|
||||
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 = (UUID)in.readValue(UUID.class.getClassLoader());
|
||||
dateTime = (OffsetDateTime)in.readValue(OffsetDateTime.class.getClassLoader());
|
||||
map = (Map<String, Animal>)in.readValue(Animal.class.getClassLoader());
|
||||
|
@ -38,6 +38,8 @@ public class Model200Response implements Parcelable {
|
||||
@SerializedName("class")
|
||||
private String propertyClass = null;
|
||||
|
||||
public Model200Response() {
|
||||
}
|
||||
public Model200Response name(Integer name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
@ -116,19 +118,13 @@ public class Model200Response implements Parcelable {
|
||||
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);
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ public class ModelApiResponse implements Parcelable {
|
||||
@SerializedName("message")
|
||||
private String message = null;
|
||||
|
||||
public ModelApiResponse() {
|
||||
}
|
||||
public ModelApiResponse code(Integer code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
@ -138,21 +140,14 @@ public class ModelApiResponse implements Parcelable {
|
||||
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);
|
||||
|
@ -35,6 +35,8 @@ public class ModelReturn implements Parcelable {
|
||||
@SerializedName("return")
|
||||
private Integer _return = null;
|
||||
|
||||
public ModelReturn() {
|
||||
}
|
||||
public ModelReturn _return(Integer _return) {
|
||||
this._return = _return;
|
||||
return this;
|
||||
@ -93,17 +95,12 @@ public class ModelReturn implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeValue(_return);
|
||||
}
|
||||
|
||||
public ModelReturn() {
|
||||
super();
|
||||
}
|
||||
|
||||
ModelReturn(Parcel in) {
|
||||
|
||||
_return = (Integer)in.readValue(null);
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,8 @@ public class Name implements Parcelable {
|
||||
@SerializedName("123Number")
|
||||
private Integer _123Number = null;
|
||||
|
||||
public Name() {
|
||||
}
|
||||
public Name name(Integer name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
@ -144,23 +146,15 @@ public class Name implements Parcelable {
|
||||
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);
|
||||
|
@ -35,6 +35,8 @@ public class NumberOnly implements Parcelable {
|
||||
@SerializedName("JustNumber")
|
||||
private BigDecimal justNumber = null;
|
||||
|
||||
public NumberOnly() {
|
||||
}
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
this.justNumber = justNumber;
|
||||
return this;
|
||||
@ -93,17 +95,12 @@ public class NumberOnly implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeValue(justNumber);
|
||||
}
|
||||
|
||||
public NumberOnly() {
|
||||
super();
|
||||
}
|
||||
|
||||
NumberOnly(Parcel in) {
|
||||
|
||||
justNumber = (BigDecimal)in.readValue(BigDecimal.class.getClassLoader());
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,8 @@ public class Order implements Parcelable {
|
||||
@SerializedName("complete")
|
||||
private Boolean complete = false;
|
||||
|
||||
public Order() {
|
||||
}
|
||||
public Order id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
@ -257,27 +259,17 @@ public class Order implements Parcelable {
|
||||
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);
|
||||
|
@ -41,6 +41,8 @@ public class OuterComposite implements Parcelable {
|
||||
@SerializedName("my_boolean")
|
||||
private Boolean myBoolean = null;
|
||||
|
||||
public OuterComposite() {
|
||||
}
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
this.myNumber = myNumber;
|
||||
return this;
|
||||
@ -139,21 +141,14 @@ public class OuterComposite implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
out.writeValue(myNumber);
|
||||
|
||||
out.writeValue(myString);
|
||||
|
||||
out.writeValue(myBoolean);
|
||||
}
|
||||
|
||||
public OuterComposite() {
|
||||
super();
|
||||
}
|
||||
|
||||
OuterComposite(Parcel in) {
|
||||
|
||||
myNumber = (BigDecimal)in.readValue(BigDecimal.class.getClassLoader());
|
||||
myString = (String)in.readValue(null);
|
||||
myBoolean = (Boolean)in.readValue(null);
|
||||
|
@ -102,6 +102,8 @@ public class Pet implements Parcelable {
|
||||
@SerializedName("status")
|
||||
private StatusEnum status = null;
|
||||
|
||||
public Pet() {
|
||||
}
|
||||
public Pet id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
@ -273,27 +275,17 @@ public class Pet implements Parcelable {
|
||||
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(Category.class.getClassLoader());
|
||||
name = (String)in.readValue(null);
|
||||
|
@ -37,6 +37,8 @@ public class ReadOnlyFirst implements Parcelable {
|
||||
@SerializedName("baz")
|
||||
private String baz = null;
|
||||
|
||||
public ReadOnlyFirst() {
|
||||
}
|
||||
/**
|
||||
* Get bar
|
||||
* @return bar
|
||||
@ -106,19 +108,13 @@ public class ReadOnlyFirst implements Parcelable {
|
||||
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);
|
||||
}
|
||||
|
@ -34,6 +34,8 @@ public class SpecialModelName implements Parcelable {
|
||||
@SerializedName("$special[property.name]")
|
||||
private Long specialPropertyName = null;
|
||||
|
||||
public SpecialModelName() {
|
||||
}
|
||||
public SpecialModelName specialPropertyName(Long specialPropertyName) {
|
||||
this.specialPropertyName = specialPropertyName;
|
||||
return this;
|
||||
@ -92,17 +94,12 @@ public class SpecialModelName implements Parcelable {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeValue(specialPropertyName);
|
||||
}
|
||||
|
||||
public SpecialModelName() {
|
||||
super();
|
||||
}
|
||||
|
||||
SpecialModelName(Parcel in) {
|
||||
|
||||
specialPropertyName = (Long)in.readValue(null);
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,8 @@ public class Tag implements Parcelable {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
public Tag() {
|
||||
}
|
||||
public Tag id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
@ -115,19 +117,13 @@ public class Tag implements Parcelable {
|
||||
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);
|
||||
}
|
||||
|
@ -55,6 +55,8 @@ public class User implements Parcelable {
|
||||
@SerializedName("userStatus")
|
||||
private Integer userStatus = null;
|
||||
|
||||
public User() {
|
||||
}
|
||||
public User id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
@ -253,31 +255,19 @@ public class User implements Parcelable {
|
||||
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);
|
||||
|
@ -16,8 +16,8 @@ package io.swagger.client.api;
|
||||
import io.swagger.client.ApiException;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import io.swagger.client.model.OuterComposite;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
@ -137,7 +137,7 @@ public class FakeApiTest {
|
||||
String string = null;
|
||||
byte[] binary = null;
|
||||
LocalDate date = null;
|
||||
DateTime dateTime = null;
|
||||
OffsetDateTime dateTime = null;
|
||||
String password = null;
|
||||
String paramCallback = null;
|
||||
api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
@ -168,4 +168,37 @@ public class FakeApiTest {
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testInlineAdditionalPropertiesTest() throws ApiException {
|
||||
Object param = null;
|
||||
api.testInlineAdditionalProperties(param);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testJsonFormDataTest() throws ApiException {
|
||||
String param = null;
|
||||
String param2 = null;
|
||||
api.testJsonFormData(param, param2);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public class FakeClassnameTags123ApiTest {
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
*
|
||||
* To test class name in snake case
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
|
Loading…
x
Reference in New Issue
Block a user