diff --git a/modules/swagger-codegen/src/main/resources/Java/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/build.gradle.mustache
index 605472d67b3d..7dfb69db4182 100644
--- a/modules/swagger-codegen/src/main/resources/Java/build.gradle.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/build.gradle.mustache
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -98,7 +98,7 @@ ext {
jackson_version = "2.4.2"
jersey_version = "1.18"
jodatime_version = "2.3"
- junit_version = "4.8.1"
+ junit_version = "4.12"
}
dependencies {
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/feign/build.gradle.mustache
index 0a678861061f..f644a9deda6d 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/feign/build.gradle.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/feign/build.gradle.mustache
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache
index 4ba5115aaf4f..c533c34558d1 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache
index ad415b545796..d033d9a1c68e 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -98,5 +98,5 @@ dependencies {
compile 'com.squareup.okhttp:okhttp:2.7.2'
compile 'com.squareup.okhttp:logging-interceptor:2.7.2'
compile 'com.google.code.gson:gson:2.3.1'
- testCompile 'junit:junit:4.8.1'
+ testCompile 'junit:junit:4.12'
}
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
index d457749d19aa..bbcbeca43671 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
@@ -163,6 +163,6 @@
2.7.2
2.3.1
1.0.0
- 4.8.1
+ 4.12
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/build.gradle.mustache
index ca26e7394964..19b741034e72 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/build.gradle.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/build.gradle.mustache
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache
index 9f34c16afc5b..1bced5a04529 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/modules/swagger-codegen/src/main/resources/Java/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/pom.mustache
index f0dd8c213b07..425b525cc559 100644
--- a/modules/swagger-codegen/src/main/resources/Java/pom.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/pom.mustache
@@ -176,6 +176,6 @@
2.4.2
2.3
1.0.0
- 4.8.1
+ 4.12
diff --git a/samples/client/petstore/java/default/build.gradle b/samples/client/petstore/java/default/build.gradle
index 9e7ac008009c..bfba070e070d 100644
--- a/samples/client/petstore/java/default/build.gradle
+++ b/samples/client/petstore/java/default/build.gradle
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -98,7 +98,7 @@ ext {
jackson_version = "2.4.2"
jersey_version = "1.18"
jodatime_version = "2.3"
- junit_version = "4.8.1"
+ junit_version = "4.12"
}
dependencies {
diff --git a/samples/client/petstore/java/default/pom.xml b/samples/client/petstore/java/default/pom.xml
index e35e30af5833..803c7eab63ae 100644
--- a/samples/client/petstore/java/default/pom.xml
+++ b/samples/client/petstore/java/default/pom.xml
@@ -64,6 +64,7 @@
org.codehaus.mojo
build-helper-maven-plugin
+ 1.10
add_sources
@@ -141,7 +142,7 @@
com.fasterxml.jackson.jaxrs
jackson-jaxrs-json-provider
${jackson-version}
-
+
com.fasterxml.jackson.datatype
jackson-datatype-joda
@@ -169,11 +170,12 @@
- 1.5.4
+ UTF-8
+ 1.5.8
1.18
2.4.2
2.3
1.0.0
- 4.8.1
+ 4.12
diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/FormatTest.java
index 78c76501e0a8..e578af2af431 100644
--- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/FormatTest.java
+++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/FormatTest.java
@@ -24,7 +24,8 @@ public class FormatTest {
private byte[] _byte = null;
private byte[] binary = null;
private Date date = null;
- private String dateTime = null;
+ private Date dateTime = null;
+ private String password = null;
/**
@@ -199,21 +200,38 @@ public class FormatTest {
/**
**/
- public FormatTest dateTime(String dateTime) {
+ public FormatTest dateTime(Date dateTime) {
this.dateTime = dateTime;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("dateTime")
- public String getDateTime() {
+ public Date getDateTime() {
return dateTime;
}
- public void setDateTime(String dateTime) {
+ public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}
+ /**
+ **/
+ public FormatTest password(String password) {
+ this.password = password;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("password")
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -233,12 +251,13 @@ public class FormatTest {
Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
- Objects.equals(this.dateTime, formatTest.dateTime);
+ Objects.equals(this.dateTime, formatTest.dateTime) &&
+ Objects.equals(this.password, formatTest.password);
}
@Override
public int hashCode() {
- return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime);
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
}
@Override
@@ -257,6 +276,7 @@ public class FormatTest {
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
+ sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle
index ee920fbc7cab..656d38a57eb1 100644
--- a/samples/client/petstore/java/feign/build.gradle
+++ b/samples/client/petstore/java/feign/build.gradle
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/FormAwareEncoder.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/FormAwareEncoder.java
index f8c7170f44ed..bf9378fc9c1e 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/FormAwareEncoder.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/FormAwareEncoder.java
@@ -14,7 +14,7 @@ import feign.codec.EncodeException;
import feign.codec.Encoder;
import feign.RequestTemplate;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class FormAwareEncoder implements Encoder {
public static final String UTF_8 = "utf-8";
private static final String LINE_FEED = "\r\n";
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/StringUtil.java
index 88aff61bf681..b8a4d2924f6b 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/StringUtil.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/StringUtil.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
index 51f6c2358c70..2d5ac8be9ee0 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
@@ -6,16 +6,13 @@ import io.swagger.client.model.Pet;
import io.swagger.client.model.InlineResponse200;
import java.io.File;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import feign.*;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public interface PetApi extends ApiClient.Api {
@@ -31,7 +28,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
void addPet(Pet body);
-
+
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
@@ -44,7 +41,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
void addPetUsingByteArray(byte[] body);
-
+
/**
* Deletes a pet
*
@@ -59,7 +56,7 @@ public interface PetApi extends ApiClient.Api {
"apiKey: {apiKey}"
})
void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey);
-
+
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
@@ -72,7 +69,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
List findPetsByStatus(@Param("status") List status);
-
+
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
@@ -85,7 +82,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
List findPetsByTags(@Param("tags") List tags);
-
+
/**
* Find pet by ID
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -98,7 +95,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
Pet getPetById(@Param("petId") Long petId);
-
+
/**
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -111,7 +108,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
InlineResponse200 getPetByIdInObject(@Param("petId") Long petId);
-
+
/**
* Fake endpoint to test byte array return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -124,7 +121,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
byte[] petPetIdtestingByteArraytrueGet(@Param("petId") Long petId);
-
+
/**
* Update an existing pet
*
@@ -137,7 +134,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
void updatePet(Pet body);
-
+
/**
* Updates a pet in the store with form data
*
@@ -152,7 +149,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
void updatePetWithForm(@Param("petId") String petId, @Param("name") String name, @Param("status") String status);
-
+
/**
* uploads an image
*
@@ -167,6 +164,4 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
void uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
-
-
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
index 97c3ad3ec165..0c358eae7dfd 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
@@ -4,16 +4,13 @@ import io.swagger.client.ApiClient;
import io.swagger.client.model.Order;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import feign.*;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public interface StoreApi extends ApiClient.Api {
@@ -29,7 +26,7 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
void deleteOrder(@Param("orderId") String orderId);
-
+
/**
* Finds orders by status
* A single status value can be provided as a string
@@ -42,7 +39,7 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
List findOrdersByStatus(@Param("status") String status);
-
+
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@@ -54,7 +51,7 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
Map getInventory();
-
+
/**
* Fake endpoint to test arbitrary object return by 'Get inventory'
* Returns an arbitrary object which is actually a map of status codes to quantities
@@ -66,10 +63,10 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
Object getInventoryInObject();
-
+
/**
* Find purchase order by ID
- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Order
*/
@@ -79,7 +76,7 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
Order getOrderById(@Param("orderId") String orderId);
-
+
/**
* Place an order for a pet
*
@@ -92,6 +89,4 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
Order placeOrder(Order body);
-
-
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
index 3fef00a41f0e..ff46fb078b57 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
@@ -4,16 +4,13 @@ import io.swagger.client.ApiClient;
import io.swagger.client.model.User;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import feign.*;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public interface UserApi extends ApiClient.Api {
@@ -29,7 +26,7 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void createUser(User body);
-
+
/**
* Creates list of users with given input array
*
@@ -42,7 +39,7 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void createUsersWithArrayInput(List body);
-
+
/**
* Creates list of users with given input array
*
@@ -55,7 +52,7 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void createUsersWithListInput(List body);
-
+
/**
* Delete user
* This can only be done by the logged in user.
@@ -68,11 +65,11 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void deleteUser(@Param("username") String username);
-
+
/**
* Get user by user name
*
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
*/
@RequestLine("GET /user/{username}")
@@ -81,7 +78,7 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
User getUserByName(@Param("username") String username);
-
+
/**
* Logs user into the system
*
@@ -95,7 +92,7 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
String loginUser(@Param("username") String username, @Param("password") String password);
-
+
/**
* Logs out current logged in user session
*
@@ -107,7 +104,7 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void logoutUser();
-
+
/**
* Updated user
* This can only be done by the logged in user.
@@ -121,6 +118,4 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void updateUser(@Param("username") String username, User body);
-
-
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java
new file mode 100644
index 000000000000..20987177b521
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java
@@ -0,0 +1,73 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+
+
+
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
+public class Animal {
+
+ private String className = null;
+
+
+ /**
+ **/
+ public Animal className(String className) {
+ this.className = className;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", required = true, value = "")
+ @JsonProperty("className")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Animal animal = (Animal) o;
+ return Objects.equals(this.className, animal.className);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Animal {\n");
+
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Cat.java
new file mode 100644
index 000000000000..5312e49f241d
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Cat.java
@@ -0,0 +1,95 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+
+
+
+
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
+public class Cat extends Animal {
+
+ private String className = null;
+ private Boolean declawed = null;
+
+
+ /**
+ **/
+ public Cat className(String className) {
+ this.className = className;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", required = true, value = "")
+ @JsonProperty("className")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+
+ /**
+ **/
+ public Cat declawed(Boolean declawed) {
+ this.declawed = declawed;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("declawed")
+ public Boolean getDeclawed() {
+ return declawed;
+ }
+ public void setDeclawed(Boolean declawed) {
+ this.declawed = declawed;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Cat cat = (Cat) o;
+ return Objects.equals(this.className, cat.className) &&
+ Objects.equals(this.declawed, cat.declawed) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, declawed, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Cat {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java
index ca030ff6c483..7d472b3e71b6 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class Category {
private Long id = null;
@@ -32,7 +32,7 @@ public class Category {
this.id = id;
}
-
+
/**
**/
public Category name(String name) {
@@ -49,7 +49,6 @@ public class Category {
this.name = name;
}
-
@Override
public boolean equals(java.lang.Object o) {
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Dog.java
new file mode 100644
index 000000000000..920c9a7ac6c5
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Dog.java
@@ -0,0 +1,95 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+
+
+
+
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
+public class Dog extends Animal {
+
+ private String className = null;
+ private String breed = null;
+
+
+ /**
+ **/
+ public Dog className(String className) {
+ this.className = className;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", required = true, value = "")
+ @JsonProperty("className")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+
+ /**
+ **/
+ public Dog breed(String breed) {
+ this.breed = breed;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("breed")
+ public String getBreed() {
+ return breed;
+ }
+ public void setBreed(String breed) {
+ this.breed = breed;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Dog dog = (Dog) o;
+ return Objects.equals(this.className, dog.className) &&
+ Objects.equals(this.breed, dog.breed) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, breed, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Dog {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java
new file mode 100644
index 000000000000..9917e21724a3
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java
@@ -0,0 +1,295 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+
+
+
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
+public class FormatTest {
+
+ private Integer integer = null;
+ private Integer int32 = null;
+ private Long int64 = null;
+ private BigDecimal number = null;
+ private Float _float = null;
+ private Double _double = null;
+ private String string = null;
+ private byte[] _byte = null;
+ private byte[] binary = null;
+ private Date date = null;
+ private Date dateTime = null;
+ private String password = null;
+
+
+ /**
+ **/
+ public FormatTest integer(Integer integer) {
+ this.integer = integer;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("integer")
+ public Integer getInteger() {
+ return integer;
+ }
+ public void setInteger(Integer integer) {
+ this.integer = integer;
+ }
+
+
+ /**
+ **/
+ public FormatTest int32(Integer int32) {
+ this.int32 = int32;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("int32")
+ public Integer getInt32() {
+ return int32;
+ }
+ public void setInt32(Integer int32) {
+ this.int32 = int32;
+ }
+
+
+ /**
+ **/
+ public FormatTest int64(Long int64) {
+ this.int64 = int64;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("int64")
+ public Long getInt64() {
+ return int64;
+ }
+ public void setInt64(Long int64) {
+ this.int64 = int64;
+ }
+
+
+ /**
+ **/
+ public FormatTest number(BigDecimal number) {
+ this.number = number;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", required = true, value = "")
+ @JsonProperty("number")
+ public BigDecimal getNumber() {
+ return number;
+ }
+ public void setNumber(BigDecimal number) {
+ this.number = number;
+ }
+
+
+ /**
+ **/
+ public FormatTest _float(Float _float) {
+ this._float = _float;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("float")
+ public Float getFloat() {
+ return _float;
+ }
+ public void setFloat(Float _float) {
+ this._float = _float;
+ }
+
+
+ /**
+ **/
+ public FormatTest _double(Double _double) {
+ this._double = _double;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("double")
+ public Double getDouble() {
+ return _double;
+ }
+ public void setDouble(Double _double) {
+ this._double = _double;
+ }
+
+
+ /**
+ **/
+ public FormatTest string(String string) {
+ this.string = string;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("string")
+ public String getString() {
+ return string;
+ }
+ public void setString(String string) {
+ this.string = string;
+ }
+
+
+ /**
+ **/
+ public FormatTest _byte(byte[] _byte) {
+ this._byte = _byte;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("byte")
+ public byte[] getByte() {
+ return _byte;
+ }
+ public void setByte(byte[] _byte) {
+ this._byte = _byte;
+ }
+
+
+ /**
+ **/
+ public FormatTest binary(byte[] binary) {
+ this.binary = binary;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("binary")
+ public byte[] getBinary() {
+ return binary;
+ }
+ public void setBinary(byte[] binary) {
+ this.binary = binary;
+ }
+
+
+ /**
+ **/
+ public FormatTest date(Date date) {
+ this.date = date;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("date")
+ public Date getDate() {
+ return date;
+ }
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+
+ /**
+ **/
+ public FormatTest dateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("dateTime")
+ public Date getDateTime() {
+ return dateTime;
+ }
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+
+ /**
+ **/
+ public FormatTest password(String password) {
+ this.password = password;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("password")
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FormatTest formatTest = (FormatTest) o;
+ return Objects.equals(this.integer, formatTest.integer) &&
+ Objects.equals(this.int32, formatTest.int32) &&
+ Objects.equals(this.int64, formatTest.int64) &&
+ Objects.equals(this.number, formatTest.number) &&
+ Objects.equals(this._float, formatTest._float) &&
+ Objects.equals(this._double, formatTest._double) &&
+ Objects.equals(this.string, formatTest.string) &&
+ Objects.equals(this._byte, formatTest._byte) &&
+ Objects.equals(this.binary, formatTest.binary) &&
+ Objects.equals(this.date, formatTest.date) &&
+ Objects.equals(this.dateTime, formatTest.dateTime) &&
+ Objects.equals(this.password, formatTest.password);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FormatTest {\n");
+
+ sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
+ sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
+ sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
+ sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
+ sb.append(" string: ").append(toIndentedString(string)).append("\n");
+ sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
+ sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
+ sb.append(" date: ").append(toIndentedString(date)).append("\n");
+ sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
+ sb.append(" password: ").append(toIndentedString(password)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/InlineResponse200.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/InlineResponse200.java
index 117d23f61f6f..721faf5189e9 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/InlineResponse200.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/InlineResponse200.java
@@ -13,16 +13,12 @@ import java.util.List;
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class InlineResponse200 {
- private List photoUrls = new ArrayList();
- private String name = null;
+ private List tags = new ArrayList();
private Long id = null;
private Object category = null;
- private List tags = new ArrayList();
public enum StatusEnum {
@@ -44,74 +40,8 @@ public class InlineResponse200 {
}
private StatusEnum status = null;
-
-
- /**
- **/
- public InlineResponse200 photoUrls(List photoUrls) {
- this.photoUrls = photoUrls;
- return this;
- }
-
- @ApiModelProperty(example = "null", value = "")
- @JsonProperty("photoUrls")
- public List getPhotoUrls() {
- return photoUrls;
- }
- public void setPhotoUrls(List photoUrls) {
- this.photoUrls = photoUrls;
- }
-
-
- /**
- **/
- public InlineResponse200 name(String name) {
- this.name = name;
- return this;
- }
-
- @ApiModelProperty(example = "doggie", value = "")
- @JsonProperty("name")
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
-
-
- /**
- **/
- public InlineResponse200 id(Long id) {
- this.id = id;
- return this;
- }
-
- @ApiModelProperty(example = "null", required = true, value = "")
- @JsonProperty("id")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
- public InlineResponse200 category(Object category) {
- this.category = category;
- return this;
- }
-
- @ApiModelProperty(example = "null", value = "")
- @JsonProperty("category")
- public Object getCategory() {
- return category;
- }
- public void setCategory(Object category) {
- this.category = category;
- }
+ private String name = null;
+ private List photoUrls = new ArrayList();
/**
@@ -130,7 +60,41 @@ public class InlineResponse200 {
this.tags = tags;
}
+
+ /**
+ **/
+ public InlineResponse200 id(Long id) {
+ this.id = id;
+ return this;
+ }
+ @ApiModelProperty(example = "null", required = true, value = "")
+ @JsonProperty("id")
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+
+ /**
+ **/
+ public InlineResponse200 category(Object category) {
+ this.category = category;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("category")
+ public Object getCategory() {
+ return category;
+ }
+ public void setCategory(Object category) {
+ this.category = category;
+ }
+
+
/**
* pet status in the store
**/
@@ -148,7 +112,40 @@ public class InlineResponse200 {
this.status = status;
}
+
+ /**
+ **/
+ public InlineResponse200 name(String name) {
+ this.name = name;
+ return this;
+ }
+ @ApiModelProperty(example = "doggie", value = "")
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ /**
+ **/
+ public InlineResponse200 photoUrls(List photoUrls) {
+ this.photoUrls = photoUrls;
+ return this;
+ }
+
+ @ApiModelProperty(example = "null", value = "")
+ @JsonProperty("photoUrls")
+ public List getPhotoUrls() {
+ return photoUrls;
+ }
+ public void setPhotoUrls(List photoUrls) {
+ this.photoUrls = photoUrls;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
@@ -159,17 +156,17 @@ public class InlineResponse200 {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
- return Objects.equals(this.photoUrls, inlineResponse200.photoUrls) &&
- Objects.equals(this.name, inlineResponse200.name) &&
+ return Objects.equals(this.tags, inlineResponse200.tags) &&
Objects.equals(this.id, inlineResponse200.id) &&
Objects.equals(this.category, inlineResponse200.category) &&
- Objects.equals(this.tags, inlineResponse200.tags) &&
- Objects.equals(this.status, inlineResponse200.status);
+ Objects.equals(this.status, inlineResponse200.status) &&
+ Objects.equals(this.name, inlineResponse200.name) &&
+ Objects.equals(this.photoUrls, inlineResponse200.photoUrls);
}
@Override
public int hashCode() {
- return Objects.hash(photoUrls, name, id, category, tags, status);
+ return Objects.hash(tags, id, category, status, name, photoUrls);
}
@Override
@@ -177,12 +174,12 @@ public class InlineResponse200 {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
- sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
- sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -199,5 +196,3 @@ public class InlineResponse200 {
}
}
-
-
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java
index 882dd6017c96..bcc40ca5b246 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java
@@ -7,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
+/**
+ * Model for testing model name starting with number
+ **/
-
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
+@ApiModel(description = "Model for testing model name starting with number")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class Model200Response {
private Integer name = null;
@@ -33,7 +34,6 @@ public class Model200Response {
this.name = name;
}
-
@Override
public boolean equals(java.lang.Object o) {
@@ -74,5 +74,3 @@ public class Model200Response {
}
}
-
-
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelReturn.java
index d4be94796869..539032cec41f 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelReturn.java
@@ -7,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
+/**
+ * Model for testing reserved words
+ **/
-
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
+@ApiModel(description = "Model for testing reserved words")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class ModelReturn {
private Integer _return = null;
@@ -33,7 +34,6 @@ public class ModelReturn {
this._return = _return;
}
-
@Override
public boolean equals(java.lang.Object o) {
@@ -74,5 +74,3 @@ public class ModelReturn {
}
}
-
-
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java
index a10c13ef8064..c29314eb091d 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java
@@ -7,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
+/**
+ * Model for testing model name same as property name
+ **/
-
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
+@ApiModel(description = "Model for testing model name same as property name")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class Name {
private Integer name = null;
@@ -25,7 +26,7 @@ public class Name {
return this;
}
- @ApiModelProperty(example = "null", value = "")
+ @ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("name")
public Integer getName() {
return name;
@@ -34,24 +35,13 @@ public class Name {
this.name = name;
}
-
- /**
- **/
- public Name snakeCase(Integer snakeCase) {
- this.snakeCase = snakeCase;
- return this;
- }
-
+
@ApiModelProperty(example = "null", value = "")
@JsonProperty("snake_case")
public Integer getSnakeCase() {
return snakeCase;
}
- public void setSnakeCase(Integer snakeCase) {
- this.snakeCase = snakeCase;
- }
-
@Override
public boolean equals(java.lang.Object o) {
@@ -94,5 +84,3 @@ public class Name {
}
}
-
-
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java
index a6ae8c7aea8a..e713b75a8450 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java
@@ -11,7 +11,7 @@ import java.util.Date;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class Order {
private Long id = null;
@@ -48,7 +48,7 @@ public class Order {
return id;
}
-
+
/**
**/
public Order petId(Long petId) {
@@ -65,7 +65,7 @@ public class Order {
this.petId = petId;
}
-
+
/**
**/
public Order quantity(Integer quantity) {
@@ -82,7 +82,7 @@ public class Order {
this.quantity = quantity;
}
-
+
/**
**/
public Order shipDate(Date shipDate) {
@@ -99,7 +99,7 @@ public class Order {
this.shipDate = shipDate;
}
-
+
/**
* Order Status
**/
@@ -117,7 +117,7 @@ public class Order {
this.status = status;
}
-
+
/**
**/
public Order complete(Boolean complete) {
@@ -134,7 +134,6 @@ public class Order {
this.complete = complete;
}
-
@Override
public boolean equals(java.lang.Object o) {
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java
index af5ed59eba3f..2d7a49dd47f0 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java
@@ -14,7 +14,7 @@ import java.util.List;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class Pet {
private Long id = null;
@@ -61,7 +61,7 @@ public class Pet {
this.id = id;
}
-
+
/**
**/
public Pet category(Category category) {
@@ -78,7 +78,7 @@ public class Pet {
this.category = category;
}
-
+
/**
**/
public Pet name(String name) {
@@ -95,7 +95,7 @@ public class Pet {
this.name = name;
}
-
+
/**
**/
public Pet photoUrls(List photoUrls) {
@@ -112,7 +112,7 @@ public class Pet {
this.photoUrls = photoUrls;
}
-
+
/**
**/
public Pet tags(List tags) {
@@ -129,7 +129,7 @@ public class Pet {
this.tags = tags;
}
-
+
/**
* pet status in the store
**/
@@ -147,7 +147,6 @@ public class Pet {
this.status = status;
}
-
@Override
public boolean equals(java.lang.Object o) {
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java
index 254f9be48288..51f88ff43062 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -9,9 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class SpecialModelName {
private Long specialPropertyName = null;
@@ -33,7 +31,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
-
@Override
public boolean equals(java.lang.Object o) {
@@ -74,5 +71,3 @@ public class SpecialModelName {
}
}
-
-
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java
index 30263bf28aea..981302df5479 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class Tag {
private Long id = null;
@@ -32,7 +32,7 @@ public class Tag {
this.id = id;
}
-
+
/**
**/
public Tag name(String name) {
@@ -49,7 +49,6 @@ public class Tag {
this.name = name;
}
-
@Override
public boolean equals(java.lang.Object o) {
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java
index b3c1d22d3677..5502f018489f 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class User {
private Long id = null;
@@ -38,7 +38,7 @@ public class User {
this.id = id;
}
-
+
/**
**/
public User username(String username) {
@@ -55,7 +55,7 @@ public class User {
this.username = username;
}
-
+
/**
**/
public User firstName(String firstName) {
@@ -72,7 +72,7 @@ public class User {
this.firstName = firstName;
}
-
+
/**
**/
public User lastName(String lastName) {
@@ -89,7 +89,7 @@ public class User {
this.lastName = lastName;
}
-
+
/**
**/
public User email(String email) {
@@ -106,7 +106,7 @@ public class User {
this.email = email;
}
-
+
/**
**/
public User password(String password) {
@@ -123,7 +123,7 @@ public class User {
this.password = password;
}
-
+
/**
**/
public User phone(String phone) {
@@ -140,7 +140,7 @@ public class User {
this.phone = phone;
}
-
+
/**
* User Status
**/
@@ -158,7 +158,6 @@ public class User {
this.userStatus = userStatus;
}
-
@Override
public boolean equals(java.lang.Object o) {
diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle
index 72fc75b04f25..2daaf89454a5 100644
--- a/samples/client/petstore/java/jersey2/build.gradle
+++ b/samples/client/petstore/java/jersey2/build.gradle
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiException.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiException.java
index 2f7ef6e3286d..0b0368d214f6 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiException.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiException.java
@@ -3,7 +3,7 @@ package io.swagger.client;
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:32.196+02:00")
public class ApiException extends Exception {
private int code = 0;
private Map> responseHeaders = null;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/Configuration.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/Configuration.java
index b06f6a4f6a4e..256cd5ff0871 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/Configuration.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/Configuration.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:32.196+02:00")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/JSON.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/JSON.java
index ff3a5cb782a1..51b30d45655a 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/JSON.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/JSON.java
@@ -8,7 +8,7 @@ import java.text.DateFormat;
import javax.ws.rs.ext.ContextResolver;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:32.196+02:00")
public class JSON implements ContextResolver {
private ObjectMapper mapper;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/Pair.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/Pair.java
index a83256c3b3df..d09ea6040bf1 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/Pair.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/Pair.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:32.196+02:00")
public class Pair {
private String name = "";
private String value = "";
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/StringUtil.java
index 513c655bd4d9..b42e4d241aea 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/StringUtil.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/StringUtil.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:32.196+02:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java
index dff33b11fc4a..61ba97f3feae 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java
@@ -16,7 +16,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T16:00:50.657+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:32.196+02:00")
public class PetApi {
private ApiClient apiClient;
@@ -36,7 +36,6 @@ public class PetApi {
this.apiClient = apiClient;
}
-
/**
* Add a new pet to the store
*
@@ -54,12 +53,9 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -72,11 +68,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
-
+
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
-
}
-
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
@@ -94,12 +88,9 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -112,11 +103,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
-
+
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
-
}
-
/**
* Deletes a pet
*
@@ -141,14 +130,11 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
if (apiKey != null)
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -161,11 +147,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
-
+
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
-
}
-
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
@@ -184,14 +168,10 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -204,12 +184,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
-
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
-
- }
-
+ }
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
@@ -228,14 +205,10 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -248,12 +221,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
-
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
-
- }
-
+ }
/**
* Find pet by ID
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -278,12 +248,9 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -294,14 +261,11 @@ public class PetApi {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
+ String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
-
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
-
- }
-
+ }
/**
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -326,12 +290,9 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -342,14 +303,11 @@ public class PetApi {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
+ String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
-
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
-
- }
-
+ }
/**
* Fake endpoint to test byte array return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -374,12 +332,9 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -390,14 +345,11 @@ public class PetApi {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
+ String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
-
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
-
- }
-
+ }
/**
* Update an existing pet
*
@@ -415,12 +367,9 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -433,11 +382,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
-
+
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
-
}
-
/**
* Updates a pet in the store with form data
*
@@ -463,15 +410,12 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
if (name != null)
localVarFormParams.put("name", name);
- if (status != null)
+if (status != null)
localVarFormParams.put("status", status);
-
final String[] localVarAccepts = {
"application/json", "application/xml"
@@ -485,11 +429,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
-
+
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
-
}
-
/**
* uploads an image
*
@@ -515,15 +457,12 @@ public class PetApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata);
- if (file != null)
+if (file != null)
localVarFormParams.put("file", file);
-
final String[] localVarAccepts = {
"application/json", "application/xml"
@@ -537,9 +476,7 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
-
+
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
-
}
-
}
diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java
index 9b7bf83fea42..bed19115aa01 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java
@@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T16:00:50.657+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:32.196+02:00")
public class StoreApi {
private ApiClient apiClient;
@@ -34,7 +34,6 @@ public class StoreApi {
this.apiClient = apiClient;
}
-
/**
* Delete purchase order by ID
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@@ -58,12 +57,9 @@ public class StoreApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -76,11 +72,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { };
-
+
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
-
}
-
/**
* Finds orders by status
* A single status value can be provided as a string
@@ -99,14 +93,10 @@ public class StoreApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -119,12 +109,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
-
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
-
- }
-
+ }
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@@ -142,12 +129,9 @@ public class StoreApi {
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
-
-
-
final String[] localVarAccepts = {
"application/json", "application/xml"
};
@@ -160,12 +144,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "api_key" };
-
GenericType
+
org.codehaus.mojo
exec-maven-plugin
@@ -124,13 +125,14 @@
+
io.swagger
swagger-annotations
- ${swagger-annotations-version}
+ ${swagger-core-version}
com.squareup.okhttp
@@ -157,10 +159,10 @@
- 1.5.0
+ 1.5.8
2.7.2
2.3.1
1.0.0
- 4.8.1
+ 4.12
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiException.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiException.java
index 529f9fff8dd7..564721b41280 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiException.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiException.java
@@ -3,7 +3,7 @@ package io.swagger.client;
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:34.419+02:00")
public class ApiException extends Exception {
private int code = 0;
private Map> responseHeaders = null;
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Configuration.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Configuration.java
index c4c80febb523..d165a15b2c70 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Configuration.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Configuration.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:34.419+02:00")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Pair.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Pair.java
index 86d8f1de1283..3527bb741c66 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Pair.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Pair.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:34.419+02:00")
public class Pair {
private String name = "";
private String value = "";
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/StringUtil.java
index f9f525491006..67634780b8e9 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/StringUtil.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/StringUtil.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:34.419+02:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java
index 507f838e3419..1bfdafb1fcb4 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java
@@ -46,7 +46,6 @@ public class PetApi {
this.apiClient = apiClient;
}
-
/* Build call for addPet */
private Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
@@ -144,14 +143,13 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for addPetUsingByteArray */
private Call addPetUsingByteArrayCall(byte[] body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
- String localVarPath = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
+ String localVarPath = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
List localVarQueryParams = new ArrayList();
@@ -242,7 +240,6 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for deletePet */
private Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -351,7 +348,6 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for findPetsByStatus */
private Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -455,7 +451,6 @@ public class PetApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for findPetsByTags */
private Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -559,7 +554,6 @@ public class PetApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for getPetById */
private Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -604,7 +598,7 @@ public class PetApi {
});
}
- String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
+ String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -667,7 +661,6 @@ public class PetApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for getPetByIdInObject */
private Call getPetByIdInObjectCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -679,7 +672,7 @@ public class PetApi {
// create path and map variables
- String localVarPath = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json")
+ String localVarPath = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List localVarQueryParams = new ArrayList();
@@ -712,7 +705,7 @@ public class PetApi {
});
}
- String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
+ String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -775,7 +768,6 @@ public class PetApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for petPetIdtestingByteArraytrueGet */
private Call petPetIdtestingByteArraytrueGetCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -787,7 +779,7 @@ public class PetApi {
// create path and map variables
- String localVarPath = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
+ String localVarPath = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List localVarQueryParams = new ArrayList();
@@ -820,7 +812,7 @@ public class PetApi {
});
}
- String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
+ String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -883,7 +875,6 @@ public class PetApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for updatePet */
private Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
@@ -981,7 +972,6 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for updatePetWithForm */
private Call updatePetWithFormCall(String petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -1095,7 +1085,6 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for uploadFile */
private Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -1209,5 +1198,4 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
-
}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java
index 086db3000d82..4d803d3b575e 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java
@@ -44,7 +44,6 @@ public class StoreApi {
this.apiClient = apiClient;
}
-
/* Build call for deleteOrder */
private Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -148,7 +147,6 @@ public class StoreApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for findOrdersByStatus */
private Call findOrdersByStatusCall(String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -252,7 +250,6 @@ public class StoreApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for getInventory */
private Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -351,14 +348,13 @@ public class StoreApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for getInventoryInObject */
private Call getInventoryInObjectCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
+ String localVarPath = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
List localVarQueryParams = new ArrayList();
@@ -450,7 +446,6 @@ public class StoreApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for getOrderById */
private Call getOrderByIdCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -495,13 +490,13 @@ public class StoreApi {
});
}
- String[] localVarAuthNames = new String[] { "test_api_key_query", "test_api_key_header" };
+ String[] localVarAuthNames = new String[] { "test_api_key_header", "test_api_key_query" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Find purchase order by ID
- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Order
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -513,7 +508,7 @@ public class StoreApi {
/**
* Find purchase order by ID
- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return ApiResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -526,7 +521,7 @@ public class StoreApi {
/**
* Find purchase order by ID (asynchronously)
- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
@@ -558,7 +553,6 @@ public class StoreApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for placeOrder */
private Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
@@ -660,5 +654,4 @@ public class StoreApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java
index 6da2483722b6..5126228e3237 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java
@@ -44,7 +44,6 @@ public class UserApi {
this.apiClient = apiClient;
}
-
/* Build call for createUser */
private Call createUserCall(User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
@@ -142,7 +141,6 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for createUsersWithArrayInput */
private Call createUsersWithArrayInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
@@ -240,7 +238,6 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for createUsersWithListInput */
private Call createUsersWithListInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
@@ -338,7 +335,6 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for deleteUser */
private Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -442,7 +438,6 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for getUserByName */
private Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -494,7 +489,7 @@ public class UserApi {
/**
* Get user by user name
*
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -506,7 +501,7 @@ public class UserApi {
/**
* Get user by user name
*
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return ApiResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -519,7 +514,7 @@ public class UserApi {
/**
* Get user by user name (asynchronously)
*
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -550,7 +545,6 @@ public class UserApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for loginUser */
private Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -659,7 +653,6 @@ public class UserApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
-
/* Build call for logoutUser */
private Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -754,7 +747,6 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
-
/* Build call for updateUser */
private Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
@@ -861,5 +853,4 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
-
}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/ApiKeyAuth.java
index 491c9ec75b89..526c11636720 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/ApiKeyAuth.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/ApiKeyAuth.java
@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:34.419+02:00")
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/OAuth.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/OAuth.java
index 03e1e10cce1d..a109275004ee 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/OAuth.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/OAuth.java
@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:34.419+02:00")
public class OAuth implements Authentication {
private String accessToken;
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Animal.java
new file mode 100644
index 000000000000..87997d9de3f5
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Animal.java
@@ -0,0 +1,66 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Animal animal = (Animal) o;
+ return Objects.equals(this.className, animal.className);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Animal {\n");
+
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java
new file mode 100644
index 000000000000..45a322f7d9bd
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java
@@ -0,0 +1,83 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Cat extends Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ @SerializedName("declawed")
+ private Boolean declawed = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Boolean getDeclawed() {
+ return declawed;
+ }
+ public void setDeclawed(Boolean declawed) {
+ this.declawed = declawed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Cat cat = (Cat) o;
+ return Objects.equals(this.className, cat.className) &&
+ Objects.equals(this.declawed, cat.declawed) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, declawed, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Cat {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Category.java
index 5aa82b234157..61151088a7de 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Category.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Category.java
@@ -14,12 +14,10 @@ public class Category {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("name")
private String name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -30,7 +28,6 @@ public class Category {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -41,7 +38,6 @@ public class Category {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java
new file mode 100644
index 000000000000..aa1bde7d22a2
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java
@@ -0,0 +1,83 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Dog extends Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ @SerializedName("breed")
+ private String breed = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getBreed() {
+ return breed;
+ }
+ public void setBreed(String breed) {
+ this.breed = breed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Dog dog = (Dog) o;
+ return Objects.equals(this.className, dog.className) &&
+ Objects.equals(this.breed, dog.breed) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, breed, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Dog {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/FormatTest.java
new file mode 100644
index 000000000000..1b9100afbb07
--- /dev/null
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/FormatTest.java
@@ -0,0 +1,233 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class FormatTest {
+
+ @SerializedName("integer")
+ private Integer integer = null;
+
+ @SerializedName("int32")
+ private Integer int32 = null;
+
+ @SerializedName("int64")
+ private Long int64 = null;
+
+ @SerializedName("number")
+ private BigDecimal number = null;
+
+ @SerializedName("float")
+ private Float _float = null;
+
+ @SerializedName("double")
+ private Double _double = null;
+
+ @SerializedName("string")
+ private String string = null;
+
+ @SerializedName("byte")
+ private byte[] _byte = null;
+
+ @SerializedName("binary")
+ private byte[] binary = null;
+
+ @SerializedName("date")
+ private Date date = null;
+
+ @SerializedName("dateTime")
+ private Date dateTime = null;
+
+ @SerializedName("password")
+ private String password = null;
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getInteger() {
+ return integer;
+ }
+ public void setInteger(Integer integer) {
+ this.integer = integer;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getInt32() {
+ return int32;
+ }
+ public void setInt32(Integer int32) {
+ this.int32 = int32;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Long getInt64() {
+ return int64;
+ }
+ public void setInt64(Long int64) {
+ this.int64 = int64;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public BigDecimal getNumber() {
+ return number;
+ }
+ public void setNumber(BigDecimal number) {
+ this.number = number;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Float getFloat() {
+ return _float;
+ }
+ public void setFloat(Float _float) {
+ this._float = _float;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Double getDouble() {
+ return _double;
+ }
+ public void setDouble(Double _double) {
+ this._double = _double;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getString() {
+ return string;
+ }
+ public void setString(String string) {
+ this.string = string;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public byte[] getByte() {
+ return _byte;
+ }
+ public void setByte(byte[] _byte) {
+ this._byte = _byte;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public byte[] getBinary() {
+ return binary;
+ }
+ public void setBinary(byte[] binary) {
+ this.binary = binary;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Date getDate() {
+ return date;
+ }
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Date getDateTime() {
+ return dateTime;
+ }
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FormatTest formatTest = (FormatTest) o;
+ return Objects.equals(this.integer, formatTest.integer) &&
+ Objects.equals(this.int32, formatTest.int32) &&
+ Objects.equals(this.int64, formatTest.int64) &&
+ Objects.equals(this.number, formatTest.number) &&
+ Objects.equals(this._float, formatTest._float) &&
+ Objects.equals(this._double, formatTest._double) &&
+ Objects.equals(this.string, formatTest.string) &&
+ Objects.equals(this._byte, formatTest._byte) &&
+ Objects.equals(this.binary, formatTest.binary) &&
+ Objects.equals(this.date, formatTest.date) &&
+ Objects.equals(this.dateTime, formatTest.dateTime) &&
+ Objects.equals(this.password, formatTest.password);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FormatTest {\n");
+
+ sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
+ sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
+ sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
+ sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
+ sb.append(" string: ").append(toIndentedString(string)).append("\n");
+ sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
+ sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
+ sb.append(" date: ").append(toIndentedString(date)).append("\n");
+ sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
+ sb.append(" password: ").append(toIndentedString(password)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/InlineResponse200.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/InlineResponse200.java
index 41d02b8a23fd..15bb92523feb 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/InlineResponse200.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/InlineResponse200.java
@@ -15,21 +15,15 @@ import com.google.gson.annotations.SerializedName;
public class InlineResponse200 {
- @SerializedName("photoUrls")
- private List photoUrls = new ArrayList();
-
- @SerializedName("name")
- private String name = null;
-
- @SerializedName("id")
- private Long id = null;
-
- @SerializedName("category")
- private Object category = null;
-
@SerializedName("tags")
private List tags = new ArrayList();
-
+
+ @SerializedName("id")
+ private Long id = null;
+
+ @SerializedName("category")
+ private Object category = null;
+
public enum StatusEnum {
@SerializedName("available")
@@ -55,53 +49,13 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
-
- /**
- **/
- @ApiModelProperty(value = "")
- public List getPhotoUrls() {
- return photoUrls;
- }
- public void setPhotoUrls(List photoUrls) {
- this.photoUrls = photoUrls;
- }
+ @SerializedName("name")
+ private String name = null;
-
- /**
- **/
- @ApiModelProperty(value = "")
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
+ @SerializedName("photoUrls")
+ private List photoUrls = new ArrayList();
-
- /**
- **/
- @ApiModelProperty(required = true, value = "")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
- @ApiModelProperty(value = "")
- public Object getCategory() {
- return category;
- }
- public void setCategory(Object category) {
- this.category = category;
- }
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -112,7 +66,26 @@ public enum StatusEnum {
this.tags = tags;
}
-
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Object getCategory() {
+ return category;
+ }
+ public void setCategory(Object category) {
+ this.category = category;
+ }
+
/**
* pet status in the store
**/
@@ -124,7 +97,26 @@ public enum StatusEnum {
this.status = status;
}
-
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public List getPhotoUrls() {
+ return photoUrls;
+ }
+ public void setPhotoUrls(List photoUrls) {
+ this.photoUrls = photoUrls;
+ }
+
@Override
public boolean equals(Object o) {
@@ -135,17 +127,17 @@ public enum StatusEnum {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
- return Objects.equals(this.photoUrls, inlineResponse200.photoUrls) &&
- Objects.equals(this.name, inlineResponse200.name) &&
+ return Objects.equals(this.tags, inlineResponse200.tags) &&
Objects.equals(this.id, inlineResponse200.id) &&
Objects.equals(this.category, inlineResponse200.category) &&
- Objects.equals(this.tags, inlineResponse200.tags) &&
- Objects.equals(this.status, inlineResponse200.status);
+ Objects.equals(this.status, inlineResponse200.status) &&
+ Objects.equals(this.name, inlineResponse200.name) &&
+ Objects.equals(this.photoUrls, inlineResponse200.photoUrls);
}
@Override
public int hashCode() {
- return Objects.hash(photoUrls, name, id, category, tags, status);
+ return Objects.hash(tags, id, category, status, name, photoUrls);
}
@Override
@@ -153,12 +145,12 @@ public enum StatusEnum {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
- sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
- sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Model200Response.java
index 3afae36dbfe0..ca0c5871388f 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Model200Response.java
@@ -9,14 +9,15 @@ import com.google.gson.annotations.SerializedName;
-
+/**
+ * Model for testing model name starting with number
+ **/
+@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
@SerializedName("name")
private Integer name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -27,7 +28,6 @@ public class Model200Response {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java
index 60da9b8e181f..071c5e7de14e 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java
@@ -9,14 +9,15 @@ import com.google.gson.annotations.SerializedName;
-
+/**
+ * Model for testing reserved words
+ **/
+@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
@SerializedName("return")
private Integer _return = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -27,7 +28,6 @@ public class ModelReturn {
this._return = _return;
}
-
@Override
public boolean equals(Object o) {
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java
index a65b8fda6148..cb65d3708161 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java
@@ -9,17 +9,21 @@ import com.google.gson.annotations.SerializedName;
-
+/**
+ * Model for testing model name same as property name
+ **/
+@ApiModel(description = "Model for testing model name same as property name")
public class Name {
@SerializedName("name")
private Integer name = null;
-
-
+ @SerializedName("snake_case")
+ private Integer snakeCase = null;
+
/**
**/
- @ApiModelProperty(value = "")
+ @ApiModelProperty(required = true, value = "")
public Integer getName() {
return name;
}
@@ -27,7 +31,13 @@ public class Name {
this.name = name;
}
-
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getSnakeCase() {
+ return snakeCase;
+ }
+
@Override
public boolean equals(Object o) {
@@ -38,12 +48,13 @@ public class Name {
return false;
}
Name name = (Name) o;
- return Objects.equals(this.name, name.name);
+ return Objects.equals(this.name, name.name) &&
+ Objects.equals(this.snakeCase, name.snakeCase);
}
@Override
public int hashCode() {
- return Objects.hash(name);
+ return Objects.hash(name, snakeCase);
}
@Override
@@ -52,6 +63,7 @@ public class Name {
sb.append("class Name {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Order.java
index 31097ea438dc..cc13fe4bfd02 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Order.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Order.java
@@ -15,16 +15,16 @@ public class Order {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("petId")
private Long petId = null;
-
+
@SerializedName("quantity")
private Integer quantity = null;
-
+
@SerializedName("shipDate")
private Date shipDate = null;
-
+
public enum StatusEnum {
@SerializedName("placed")
@@ -50,12 +50,10 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
+
@SerializedName("complete")
private Boolean complete = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -63,7 +61,6 @@ public enum StatusEnum {
return id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -74,7 +71,6 @@ public enum StatusEnum {
this.petId = petId;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -85,7 +81,6 @@ public enum StatusEnum {
this.quantity = quantity;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -96,7 +91,6 @@ public enum StatusEnum {
this.shipDate = shipDate;
}
-
/**
* Order Status
**/
@@ -108,7 +102,6 @@ public enum StatusEnum {
this.status = status;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -119,7 +112,6 @@ public enum StatusEnum {
this.complete = complete;
}
-
@Override
public boolean equals(Object o) {
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Pet.java
index 7895e23ba13b..fe1f0a34aa3c 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Pet.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Pet.java
@@ -18,19 +18,19 @@ public class Pet {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("category")
private Category category = null;
-
+
@SerializedName("name")
private String name = null;
-
+
@SerializedName("photoUrls")
private List photoUrls = new ArrayList();
-
+
@SerializedName("tags")
private List tags = new ArrayList();
-
+
public enum StatusEnum {
@SerializedName("available")
@@ -56,9 +56,7 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -69,7 +67,6 @@ public enum StatusEnum {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -80,7 +77,6 @@ public enum StatusEnum {
this.category = category;
}
-
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -91,7 +87,6 @@ public enum StatusEnum {
this.name = name;
}
-
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -102,7 +97,6 @@ public enum StatusEnum {
this.photoUrls = photoUrls;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -113,7 +107,6 @@ public enum StatusEnum {
this.tags = tags;
}
-
/**
* pet status in the store
**/
@@ -125,7 +118,6 @@ public enum StatusEnum {
this.status = status;
}
-
@Override
public boolean equals(Object o) {
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/SpecialModelName.java
index 9a0c166186c5..1f9bc95113ec 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -14,9 +14,7 @@ public class SpecialModelName {
@SerializedName("$special[property.name]")
private Long specialPropertyName = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -27,7 +25,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
-
@Override
public boolean equals(Object o) {
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Tag.java
index f5a148ecc36e..d605f0195692 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Tag.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Tag.java
@@ -14,12 +14,10 @@ public class Tag {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("name")
private String name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -30,7 +28,6 @@ public class Tag {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -41,7 +38,6 @@ public class Tag {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/User.java
index 9b71b457d152..a9f6b63a2f42 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/User.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/User.java
@@ -14,30 +14,28 @@ public class User {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("username")
private String username = null;
-
+
@SerializedName("firstName")
private String firstName = null;
-
+
@SerializedName("lastName")
private String lastName = null;
-
+
@SerializedName("email")
private String email = null;
-
+
@SerializedName("password")
private String password = null;
-
+
@SerializedName("phone")
private String phone = null;
-
+
@SerializedName("userStatus")
private Integer userStatus = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -48,7 +46,6 @@ public class User {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -59,7 +56,6 @@ public class User {
this.username = username;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -70,7 +66,6 @@ public class User {
this.firstName = firstName;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -81,7 +76,6 @@ public class User {
this.lastName = lastName;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -92,7 +86,6 @@ public class User {
this.email = email;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -103,7 +96,6 @@ public class User {
this.password = password;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -114,7 +106,6 @@ public class User {
this.phone = phone;
}
-
/**
* User Status
**/
@@ -126,7 +117,6 @@ public class User {
this.userStatus = userStatus;
}
-
@Override
public boolean equals(Object o) {
diff --git a/samples/client/petstore/java/retrofit/build.gradle b/samples/client/petstore/java/retrofit/build.gradle
index 255a76e0403c..7d0d52536ebb 100644
--- a/samples/client/petstore/java/retrofit/build.gradle
+++ b/samples/client/petstore/java/retrofit/build.gradle
@@ -1,3 +1,6 @@
+apply plugin: 'idea'
+apply plugin: 'eclipse'
+
group = 'io.swagger'
version = '1.0.0'
@@ -6,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -22,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/StringUtil.java
index 0eec085e2a49..1ce483dd74c3 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/StringUtil.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/StringUtil.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:53.252+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:35.471+02:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/PetApi.java
index 92147932bace..af2482b371ff 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/PetApi.java
@@ -10,17 +10,12 @@ import io.swagger.client.model.Pet;
import io.swagger.client.model.InlineResponse200;
import java.io.File;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface PetApi {
-
/**
* Add a new pet to the store
* Sync method
@@ -46,7 +41,6 @@ public interface PetApi {
void addPet(
@Body Pet body, Callback cb
);
-
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
* Sync method
@@ -55,7 +49,7 @@ public interface PetApi {
* @return Void
*/
- @POST("/pet?testing_byte_array=true")
+ @POST("/pet?testing_byte_array=true")
Void addPetUsingByteArray(
@Body byte[] body
);
@@ -68,11 +62,10 @@ public interface PetApi {
* @return void
*/
- @POST("/pet?testing_byte_array=true")
+ @POST("/pet?testing_byte_array=true")
void addPetUsingByteArray(
@Body byte[] body, Callback cb
);
-
/**
* Deletes a pet
* Sync method
@@ -100,7 +93,6 @@ public interface PetApi {
void deletePet(
@Path("petId") Long petId, @Header("api_key") String apiKey, Callback cb
);
-
/**
* Finds Pets by status
* Sync method
@@ -126,7 +118,6 @@ public interface PetApi {
void findPetsByStatus(
@Query("status") List status, Callback> cb
);
-
/**
* Finds Pets by tags
* Sync method
@@ -152,7 +143,6 @@ public interface PetApi {
void findPetsByTags(
@Query("tags") List tags, Callback> cb
);
-
/**
* Find pet by ID
* Sync method
@@ -178,7 +168,6 @@ public interface PetApi {
void getPetById(
@Path("petId") Long petId, Callback cb
);
-
/**
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
* Sync method
@@ -187,7 +176,7 @@ public interface PetApi {
* @return InlineResponse200
*/
- @GET("/pet/{petId}?response=inline_arbitrary_object")
+ @GET("/pet/{petId}?response=inline_arbitrary_object")
InlineResponse200 getPetByIdInObject(
@Path("petId") Long petId
);
@@ -200,11 +189,10 @@ public interface PetApi {
* @return void
*/
- @GET("/pet/{petId}?response=inline_arbitrary_object")
+ @GET("/pet/{petId}?response=inline_arbitrary_object")
void getPetByIdInObject(
@Path("petId") Long petId, Callback cb
);
-
/**
* Fake endpoint to test byte array return by 'Find pet by ID'
* Sync method
@@ -213,7 +201,7 @@ public interface PetApi {
* @return byte[]
*/
- @GET("/pet/{petId}?testing_byte_array=true")
+ @GET("/pet/{petId}?testing_byte_array=true")
byte[] petPetIdtestingByteArraytrueGet(
@Path("petId") Long petId
);
@@ -226,11 +214,10 @@ public interface PetApi {
* @return void
*/
- @GET("/pet/{petId}?testing_byte_array=true")
+ @GET("/pet/{petId}?testing_byte_array=true")
void petPetIdtestingByteArraytrueGet(
@Path("petId") Long petId, Callback cb
);
-
/**
* Update an existing pet
* Sync method
@@ -256,7 +243,6 @@ public interface PetApi {
void updatePet(
@Body Pet body, Callback cb
);
-
/**
* Updates a pet in the store with form data
* Sync method
@@ -288,7 +274,6 @@ public interface PetApi {
void updatePetWithForm(
@Path("petId") String petId, @Field("name") String name, @Field("status") String status, Callback cb
);
-
/**
* uploads an image
* Sync method
@@ -320,6 +305,4 @@ public interface PetApi {
void uploadFile(
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file") TypedFile file, Callback cb
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/StoreApi.java
index 815d067c9674..ede732a986bf 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/StoreApi.java
@@ -8,17 +8,12 @@ import retrofit.mime.*;
import io.swagger.client.model.Order;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface StoreApi {
-
/**
* Delete purchase order by ID
* Sync method
@@ -44,7 +39,6 @@ public interface StoreApi {
void deleteOrder(
@Path("orderId") String orderId, Callback cb
);
-
/**
* Finds orders by status
* Sync method
@@ -70,7 +64,6 @@ public interface StoreApi {
void findOrdersByStatus(
@Query("status") String status, Callback> cb
);
-
/**
* Returns pet inventories by status
* Sync method
@@ -93,7 +86,6 @@ public interface StoreApi {
void getInventory(
Callback> cb
);
-
/**
* Fake endpoint to test arbitrary object return by 'Get inventory'
* Sync method
@@ -101,7 +93,7 @@ public interface StoreApi {
* @return Object
*/
- @GET("/store/inventory?response=arbitrary_object")
+ @GET("/store/inventory?response=arbitrary_object")
Object getInventoryInObject();
@@ -112,15 +104,14 @@ public interface StoreApi {
* @return void
*/
- @GET("/store/inventory?response=arbitrary_object")
+ @GET("/store/inventory?response=arbitrary_object")
void getInventoryInObject(
Callback cb
);
-
/**
* Find purchase order by ID
* Sync method
- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Order
*/
@@ -142,7 +133,6 @@ public interface StoreApi {
void getOrderById(
@Path("orderId") String orderId, Callback cb
);
-
/**
* Place an order for a pet
* Sync method
@@ -168,6 +158,4 @@ public interface StoreApi {
void placeOrder(
@Body Order body, Callback cb
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/UserApi.java
index a0d913e071f9..ea7285de79c0 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/UserApi.java
@@ -8,17 +8,12 @@ import retrofit.mime.*;
import io.swagger.client.model.User;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface UserApi {
-
/**
* Create user
* Sync method
@@ -44,7 +39,6 @@ public interface UserApi {
void createUser(
@Body User body, Callback cb
);
-
/**
* Creates list of users with given input array
* Sync method
@@ -70,7 +64,6 @@ public interface UserApi {
void createUsersWithArrayInput(
@Body List body, Callback cb
);
-
/**
* Creates list of users with given input array
* Sync method
@@ -96,7 +89,6 @@ public interface UserApi {
void createUsersWithListInput(
@Body List body, Callback cb
);
-
/**
* Delete user
* Sync method
@@ -122,12 +114,11 @@ public interface UserApi {
void deleteUser(
@Path("username") String username, Callback cb
);
-
/**
* Get user by user name
* Sync method
*
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
*/
@@ -139,7 +130,7 @@ public interface UserApi {
/**
* Get user by user name
* Async method
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param cb callback method
* @return void
*/
@@ -148,7 +139,6 @@ public interface UserApi {
void getUserByName(
@Path("username") String username, Callback cb
);
-
/**
* Logs user into the system
* Sync method
@@ -176,7 +166,6 @@ public interface UserApi {
void loginUser(
@Query("username") String username, @Query("password") String password, Callback cb
);
-
/**
* Logs out current logged in user session
* Sync method
@@ -199,7 +188,6 @@ public interface UserApi {
void logoutUser(
Callback cb
);
-
/**
* Updated user
* Sync method
@@ -227,6 +215,4 @@ public interface UserApi {
void updateUser(
@Path("username") String username, @Body User body, Callback cb
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Animal.java
new file mode 100644
index 000000000000..8df24899fb0b
--- /dev/null
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Animal.java
@@ -0,0 +1,66 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Animal animal = (Animal) o;
+ return Objects.equals(className, animal.className);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Animal {\n");
+
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Cat.java
new file mode 100644
index 000000000000..60a99ed86da2
--- /dev/null
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Cat.java
@@ -0,0 +1,82 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Cat extends Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ @SerializedName("declawed")
+ private Boolean declawed = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Boolean getDeclawed() {
+ return declawed;
+ }
+ public void setDeclawed(Boolean declawed) {
+ this.declawed = declawed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Cat cat = (Cat) o;
+ return Objects.equals(className, cat.className) &&
+ Objects.equals(declawed, cat.declawed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, declawed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Cat {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Category.java
index 67de63eb1792..93ec7bd0877c 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Category.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Category.java
@@ -4,24 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class Category {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("name")
private String name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -32,7 +28,6 @@ public class Category {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -43,7 +38,6 @@ public class Category {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Category {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Dog.java
new file mode 100644
index 000000000000..1c31fc93746b
--- /dev/null
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Dog.java
@@ -0,0 +1,82 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Dog extends Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ @SerializedName("breed")
+ private String breed = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getBreed() {
+ return breed;
+ }
+ public void setBreed(String breed) {
+ this.breed = breed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Dog dog = (Dog) o;
+ return Objects.equals(className, dog.className) &&
+ Objects.equals(breed, dog.breed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, breed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Dog {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/FormatTest.java
new file mode 100644
index 000000000000..29d17bbdfe70
--- /dev/null
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/FormatTest.java
@@ -0,0 +1,233 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class FormatTest {
+
+ @SerializedName("integer")
+ private Integer integer = null;
+
+ @SerializedName("int32")
+ private Integer int32 = null;
+
+ @SerializedName("int64")
+ private Long int64 = null;
+
+ @SerializedName("number")
+ private BigDecimal number = null;
+
+ @SerializedName("float")
+ private Float _float = null;
+
+ @SerializedName("double")
+ private Double _double = null;
+
+ @SerializedName("string")
+ private String string = null;
+
+ @SerializedName("byte")
+ private byte[] _byte = null;
+
+ @SerializedName("binary")
+ private byte[] binary = null;
+
+ @SerializedName("date")
+ private Date date = null;
+
+ @SerializedName("dateTime")
+ private Date dateTime = null;
+
+ @SerializedName("password")
+ private String password = null;
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getInteger() {
+ return integer;
+ }
+ public void setInteger(Integer integer) {
+ this.integer = integer;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getInt32() {
+ return int32;
+ }
+ public void setInt32(Integer int32) {
+ this.int32 = int32;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Long getInt64() {
+ return int64;
+ }
+ public void setInt64(Long int64) {
+ this.int64 = int64;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public BigDecimal getNumber() {
+ return number;
+ }
+ public void setNumber(BigDecimal number) {
+ this.number = number;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Float getFloat() {
+ return _float;
+ }
+ public void setFloat(Float _float) {
+ this._float = _float;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Double getDouble() {
+ return _double;
+ }
+ public void setDouble(Double _double) {
+ this._double = _double;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getString() {
+ return string;
+ }
+ public void setString(String string) {
+ this.string = string;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public byte[] getByte() {
+ return _byte;
+ }
+ public void setByte(byte[] _byte) {
+ this._byte = _byte;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public byte[] getBinary() {
+ return binary;
+ }
+ public void setBinary(byte[] binary) {
+ this.binary = binary;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Date getDate() {
+ return date;
+ }
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Date getDateTime() {
+ return dateTime;
+ }
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FormatTest formatTest = (FormatTest) o;
+ return Objects.equals(integer, formatTest.integer) &&
+ Objects.equals(int32, formatTest.int32) &&
+ Objects.equals(int64, formatTest.int64) &&
+ Objects.equals(number, formatTest.number) &&
+ Objects.equals(_float, formatTest._float) &&
+ Objects.equals(_double, formatTest._double) &&
+ Objects.equals(string, formatTest.string) &&
+ Objects.equals(_byte, formatTest._byte) &&
+ Objects.equals(binary, formatTest.binary) &&
+ Objects.equals(date, formatTest.date) &&
+ Objects.equals(dateTime, formatTest.dateTime) &&
+ Objects.equals(password, formatTest.password);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FormatTest {\n");
+
+ sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
+ sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
+ sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
+ sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
+ sb.append(" string: ").append(toIndentedString(string)).append("\n");
+ sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
+ sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
+ sb.append(" date: ").append(toIndentedString(date)).append("\n");
+ sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
+ sb.append(" password: ").append(toIndentedString(password)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/InlineResponse200.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/InlineResponse200.java
index 165f069a05b9..b17bf005009c 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/InlineResponse200.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/InlineResponse200.java
@@ -7,31 +7,23 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
-
import com.google.gson.annotations.SerializedName;
-
public class InlineResponse200 {
- @SerializedName("photoUrls")
- private List photoUrls = new ArrayList();
-
- @SerializedName("name")
- private String name = null;
-
- @SerializedName("id")
- private Long id = null;
-
- @SerializedName("category")
- private Object category = null;
-
@SerializedName("tags")
private List tags = new ArrayList();
-
+
+ @SerializedName("id")
+ private Long id = null;
+
+ @SerializedName("category")
+ private Object category = null;
+
public enum StatusEnum {
@SerializedName("available")
@@ -57,53 +49,13 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
-
- /**
- **/
- @ApiModelProperty(value = "")
- public List getPhotoUrls() {
- return photoUrls;
- }
- public void setPhotoUrls(List photoUrls) {
- this.photoUrls = photoUrls;
- }
+ @SerializedName("name")
+ private String name = null;
-
- /**
- **/
- @ApiModelProperty(value = "")
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
+ @SerializedName("photoUrls")
+ private List photoUrls = new ArrayList();
-
- /**
- **/
- @ApiModelProperty(required = true, value = "")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
- @ApiModelProperty(value = "")
- public Object getCategory() {
- return category;
- }
- public void setCategory(Object category) {
- this.category = category;
- }
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -114,7 +66,26 @@ public enum StatusEnum {
this.tags = tags;
}
-
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Object getCategory() {
+ return category;
+ }
+ public void setCategory(Object category) {
+ this.category = category;
+ }
+
/**
* pet status in the store
**/
@@ -126,7 +97,26 @@ public enum StatusEnum {
this.status = status;
}
-
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public List getPhotoUrls() {
+ return photoUrls;
+ }
+ public void setPhotoUrls(List photoUrls) {
+ this.photoUrls = photoUrls;
+ }
+
@Override
public boolean equals(Object o) {
@@ -137,17 +127,17 @@ public enum StatusEnum {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
- return Objects.equals(photoUrls, inlineResponse200.photoUrls) &&
- Objects.equals(name, inlineResponse200.name) &&
+ return Objects.equals(tags, inlineResponse200.tags) &&
Objects.equals(id, inlineResponse200.id) &&
Objects.equals(category, inlineResponse200.category) &&
- Objects.equals(tags, inlineResponse200.tags) &&
- Objects.equals(status, inlineResponse200.status);
+ Objects.equals(status, inlineResponse200.status) &&
+ Objects.equals(name, inlineResponse200.name) &&
+ Objects.equals(photoUrls, inlineResponse200.photoUrls);
}
@Override
public int hashCode() {
- return Objects.hash(photoUrls, name, id, category, tags, status);
+ return Objects.hash(tags, id, category, status, name, photoUrls);
}
@Override
@@ -155,12 +145,12 @@ public enum StatusEnum {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
- sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
- sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -176,5 +166,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java
index 80b0aed92a8a..3cbb15006fbc 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java
@@ -4,21 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing model name starting with number
+ **/
+@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
@SerializedName("name")
private Integer name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +28,6 @@ public class Model200Response {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +67,3 @@ public class Model200Response {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java
index ce8c1238fdb5..a3ecfb92156d 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java
@@ -4,21 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing reserved words
+ **/
+@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
@SerializedName("return")
private Integer _return = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +28,6 @@ public class ModelReturn {
this._return = _return;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +67,3 @@ public class ModelReturn {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java
index 370214bd21c6..fd90800298e5 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java
@@ -4,27 +4,26 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing model name same as property name
+ **/
+@ApiModel(description = "Model for testing model name same as property name")
public class Name {
@SerializedName("name")
private Integer name = null;
-
+
@SerializedName("snake_case")
private Integer snakeCase = null;
-
-
/**
**/
- @ApiModelProperty(value = "")
+ @ApiModelProperty(required = true, value = "")
public Integer getName() {
return name;
}
@@ -32,18 +31,13 @@ public class Name {
this.name = name;
}
-
/**
**/
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
- public void setSnakeCase(Integer snakeCase) {
- this.snakeCase = snakeCase;
- }
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Name {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Order.java
index e601bd7a15a0..f1fb2ad7409f 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Order.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Order.java
@@ -5,28 +5,26 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
-
import com.google.gson.annotations.SerializedName;
-
public class Order {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("petId")
private Long petId = null;
-
+
@SerializedName("quantity")
private Integer quantity = null;
-
+
@SerializedName("shipDate")
private Date shipDate = null;
-
+
public enum StatusEnum {
@SerializedName("placed")
@@ -52,12 +50,10 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
+
@SerializedName("complete")
private Boolean complete = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -65,7 +61,6 @@ public enum StatusEnum {
return id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -76,7 +71,6 @@ public enum StatusEnum {
this.petId = petId;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -87,7 +81,6 @@ public enum StatusEnum {
this.quantity = quantity;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -98,7 +91,6 @@ public enum StatusEnum {
this.shipDate = shipDate;
}
-
/**
* Order Status
**/
@@ -110,7 +102,6 @@ public enum StatusEnum {
this.status = status;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -121,7 +112,6 @@ public enum StatusEnum {
this.complete = complete;
}
-
@Override
public boolean equals(Object o) {
@@ -171,5 +161,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Pet.java
index 5d1210dc55b5..bcee581aa978 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Pet.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Pet.java
@@ -8,31 +8,29 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
-
import com.google.gson.annotations.SerializedName;
-
public class Pet {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("category")
private Category category = null;
-
+
@SerializedName("name")
private String name = null;
-
+
@SerializedName("photoUrls")
private List photoUrls = new ArrayList();
-
+
@SerializedName("tags")
private List tags = new ArrayList();
-
+
public enum StatusEnum {
@SerializedName("available")
@@ -58,9 +56,7 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -71,7 +67,6 @@ public enum StatusEnum {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -82,7 +77,6 @@ public enum StatusEnum {
this.category = category;
}
-
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -93,7 +87,6 @@ public enum StatusEnum {
this.name = name;
}
-
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -104,7 +97,6 @@ public enum StatusEnum {
this.photoUrls = photoUrls;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -115,7 +107,6 @@ public enum StatusEnum {
this.tags = tags;
}
-
/**
* pet status in the store
**/
@@ -127,7 +118,6 @@ public enum StatusEnum {
this.status = status;
}
-
@Override
public boolean equals(Object o) {
@@ -177,5 +167,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/SpecialModelName.java
index b5a96d5fc398..e2354b064b20 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -4,21 +4,17 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class SpecialModelName {
@SerializedName("$special[property.name]")
private Long specialPropertyName = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +25,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +64,3 @@ public class SpecialModelName {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Tag.java
index 6ee49ee21660..9c5ac6cf9a72 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Tag.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Tag.java
@@ -4,24 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class Tag {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("name")
private String name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -32,7 +28,6 @@ public class Tag {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -43,7 +38,6 @@ public class Tag {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Tag {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/User.java
index 98196393ef11..39e40837a6ab 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/User.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/User.java
@@ -4,42 +4,38 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class User {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("username")
private String username = null;
-
+
@SerializedName("firstName")
private String firstName = null;
-
+
@SerializedName("lastName")
private String lastName = null;
-
+
@SerializedName("email")
private String email = null;
-
+
@SerializedName("password")
private String password = null;
-
+
@SerializedName("phone")
private String phone = null;
-
+
@SerializedName("userStatus")
private Integer userStatus = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -50,7 +46,6 @@ public class User {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -61,7 +56,6 @@ public class User {
this.username = username;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -72,7 +66,6 @@ public class User {
this.firstName = firstName;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -83,7 +76,6 @@ public class User {
this.lastName = lastName;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -94,7 +86,6 @@ public class User {
this.email = email;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -105,7 +96,6 @@ public class User {
this.password = password;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -116,7 +106,6 @@ public class User {
this.phone = phone;
}
-
/**
* User Status
**/
@@ -128,7 +117,6 @@ public class User {
this.userStatus = userStatus;
}
-
@Override
public boolean equals(Object o) {
@@ -182,5 +170,3 @@ public class User {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/build.gradle b/samples/client/petstore/java/retrofit2/build.gradle
index ab71653f739f..a893deaa2ae3 100644
--- a/samples/client/petstore/java/retrofit2/build.gradle
+++ b/samples/client/petstore/java/retrofit2/build.gradle
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/StringUtil.java
index d7254df29fc2..dace285deca2 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/StringUtil.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/StringUtil.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:54.660+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:36.537+02:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java
index 2cc69238a6b2..f56c7de3ddf7 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java
@@ -12,17 +12,12 @@ import io.swagger.client.model.Pet;
import io.swagger.client.model.InlineResponse200;
import java.io.File;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface PetApi {
-
/**
* Add a new pet to the store
*
@@ -35,7 +30,6 @@ public interface PetApi {
@Body Pet body
);
-
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
@@ -43,12 +37,11 @@ public interface PetApi {
* @return Call
*/
- @POST("pet?testing_byte_array=true")
+ @POST("pet?testing_byte_array=true")
Call addPetUsingByteArray(
@Body byte[] body
);
-
/**
* Deletes a pet
*
@@ -62,7 +55,6 @@ public interface PetApi {
@Path("petId") Long petId, @Header("api_key") String apiKey
);
-
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
@@ -75,7 +67,6 @@ public interface PetApi {
@Query("status") List status
);
-
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
@@ -88,7 +79,6 @@ public interface PetApi {
@Query("tags") List tags
);
-
/**
* Find pet by ID
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -101,7 +91,6 @@ public interface PetApi {
@Path("petId") Long petId
);
-
/**
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -109,12 +98,11 @@ public interface PetApi {
* @return Call
*/
- @GET("pet/{petId}?response=inline_arbitrary_object")
+ @GET("pet/{petId}?response=inline_arbitrary_object")
Call getPetByIdInObject(
@Path("petId") Long petId
);
-
/**
* Fake endpoint to test byte array return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -122,12 +110,11 @@ public interface PetApi {
* @return Call
*/
- @GET("pet/{petId}?testing_byte_array=true")
+ @GET("pet/{petId}?testing_byte_array=true")
Call petPetIdtestingByteArraytrueGet(
@Path("petId") Long petId
);
-
/**
* Update an existing pet
*
@@ -140,7 +127,6 @@ public interface PetApi {
@Body Pet body
);
-
/**
* Updates a pet in the store with form data
*
@@ -156,7 +142,6 @@ public interface PetApi {
@Path("petId") String petId, @Field("name") String name, @Field("status") String status
);
-
/**
* uploads an image
*
@@ -172,6 +157,4 @@ public interface PetApi {
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java
index d023308c32e9..55a3ea5b46ae 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java
@@ -10,17 +10,12 @@ import okhttp3.RequestBody;
import io.swagger.client.model.Order;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface StoreApi {
-
/**
* Delete purchase order by ID
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@@ -33,7 +28,6 @@ public interface StoreApi {
@Path("orderId") String orderId
);
-
/**
* Finds orders by status
* A single status value can be provided as a string
@@ -46,7 +40,6 @@ public interface StoreApi {
@Query("status") String status
);
-
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@@ -57,21 +50,19 @@ public interface StoreApi {
Call> getInventory();
-
/**
* Fake endpoint to test arbitrary object return by 'Get inventory'
* Returns an arbitrary object which is actually a map of status codes to quantities
* @return Call
*/
- @GET("store/inventory?response=arbitrary_object")
+ @GET("store/inventory?response=arbitrary_object")
Call getInventoryInObject();
-
/**
* Find purchase order by ID
- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Call
*/
@@ -81,7 +72,6 @@ public interface StoreApi {
@Path("orderId") String orderId
);
-
/**
* Place an order for a pet
*
@@ -94,6 +84,4 @@ public interface StoreApi {
@Body Order body
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/UserApi.java
index 08aeb90a5839..ce02953a0c8d 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/UserApi.java
@@ -10,17 +10,12 @@ import okhttp3.RequestBody;
import io.swagger.client.model.User;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface UserApi {
-
/**
* Create user
* This can only be done by the logged in user.
@@ -33,7 +28,6 @@ public interface UserApi {
@Body User body
);
-
/**
* Creates list of users with given input array
*
@@ -46,7 +40,6 @@ public interface UserApi {
@Body List body
);
-
/**
* Creates list of users with given input array
*
@@ -59,7 +52,6 @@ public interface UserApi {
@Body List body
);
-
/**
* Delete user
* This can only be done by the logged in user.
@@ -72,11 +64,10 @@ public interface UserApi {
@Path("username") String username
);
-
/**
* Get user by user name
*
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return Call
*/
@@ -85,7 +76,6 @@ public interface UserApi {
@Path("username") String username
);
-
/**
* Logs user into the system
*
@@ -99,7 +89,6 @@ public interface UserApi {
@Query("username") String username, @Query("password") String password
);
-
/**
* Logs out current logged in user session
*
@@ -110,7 +99,6 @@ public interface UserApi {
Call logoutUser();
-
/**
* Updated user
* This can only be done by the logged in user.
@@ -124,6 +112,4 @@ public interface UserApi {
@Path("username") String username, @Body User body
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Animal.java
new file mode 100644
index 000000000000..8df24899fb0b
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Animal.java
@@ -0,0 +1,66 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Animal animal = (Animal) o;
+ return Objects.equals(className, animal.className);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Animal {\n");
+
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Cat.java
new file mode 100644
index 000000000000..60a99ed86da2
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Cat.java
@@ -0,0 +1,82 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Cat extends Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ @SerializedName("declawed")
+ private Boolean declawed = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Boolean getDeclawed() {
+ return declawed;
+ }
+ public void setDeclawed(Boolean declawed) {
+ this.declawed = declawed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Cat cat = (Cat) o;
+ return Objects.equals(className, cat.className) &&
+ Objects.equals(declawed, cat.declawed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, declawed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Cat {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Category.java
index 67de63eb1792..93ec7bd0877c 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Category.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Category.java
@@ -4,24 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class Category {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("name")
private String name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -32,7 +28,6 @@ public class Category {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -43,7 +38,6 @@ public class Category {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Category {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Dog.java
new file mode 100644
index 000000000000..1c31fc93746b
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Dog.java
@@ -0,0 +1,82 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Dog extends Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ @SerializedName("breed")
+ private String breed = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getBreed() {
+ return breed;
+ }
+ public void setBreed(String breed) {
+ this.breed = breed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Dog dog = (Dog) o;
+ return Objects.equals(className, dog.className) &&
+ Objects.equals(breed, dog.breed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, breed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Dog {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/FormatTest.java
new file mode 100644
index 000000000000..29d17bbdfe70
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/FormatTest.java
@@ -0,0 +1,233 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class FormatTest {
+
+ @SerializedName("integer")
+ private Integer integer = null;
+
+ @SerializedName("int32")
+ private Integer int32 = null;
+
+ @SerializedName("int64")
+ private Long int64 = null;
+
+ @SerializedName("number")
+ private BigDecimal number = null;
+
+ @SerializedName("float")
+ private Float _float = null;
+
+ @SerializedName("double")
+ private Double _double = null;
+
+ @SerializedName("string")
+ private String string = null;
+
+ @SerializedName("byte")
+ private byte[] _byte = null;
+
+ @SerializedName("binary")
+ private byte[] binary = null;
+
+ @SerializedName("date")
+ private Date date = null;
+
+ @SerializedName("dateTime")
+ private Date dateTime = null;
+
+ @SerializedName("password")
+ private String password = null;
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getInteger() {
+ return integer;
+ }
+ public void setInteger(Integer integer) {
+ this.integer = integer;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getInt32() {
+ return int32;
+ }
+ public void setInt32(Integer int32) {
+ this.int32 = int32;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Long getInt64() {
+ return int64;
+ }
+ public void setInt64(Long int64) {
+ this.int64 = int64;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public BigDecimal getNumber() {
+ return number;
+ }
+ public void setNumber(BigDecimal number) {
+ this.number = number;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Float getFloat() {
+ return _float;
+ }
+ public void setFloat(Float _float) {
+ this._float = _float;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Double getDouble() {
+ return _double;
+ }
+ public void setDouble(Double _double) {
+ this._double = _double;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getString() {
+ return string;
+ }
+ public void setString(String string) {
+ this.string = string;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public byte[] getByte() {
+ return _byte;
+ }
+ public void setByte(byte[] _byte) {
+ this._byte = _byte;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public byte[] getBinary() {
+ return binary;
+ }
+ public void setBinary(byte[] binary) {
+ this.binary = binary;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Date getDate() {
+ return date;
+ }
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Date getDateTime() {
+ return dateTime;
+ }
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FormatTest formatTest = (FormatTest) o;
+ return Objects.equals(integer, formatTest.integer) &&
+ Objects.equals(int32, formatTest.int32) &&
+ Objects.equals(int64, formatTest.int64) &&
+ Objects.equals(number, formatTest.number) &&
+ Objects.equals(_float, formatTest._float) &&
+ Objects.equals(_double, formatTest._double) &&
+ Objects.equals(string, formatTest.string) &&
+ Objects.equals(_byte, formatTest._byte) &&
+ Objects.equals(binary, formatTest.binary) &&
+ Objects.equals(date, formatTest.date) &&
+ Objects.equals(dateTime, formatTest.dateTime) &&
+ Objects.equals(password, formatTest.password);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FormatTest {\n");
+
+ sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
+ sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
+ sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
+ sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
+ sb.append(" string: ").append(toIndentedString(string)).append("\n");
+ sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
+ sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
+ sb.append(" date: ").append(toIndentedString(date)).append("\n");
+ sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
+ sb.append(" password: ").append(toIndentedString(password)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/InlineResponse200.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/InlineResponse200.java
index 165f069a05b9..b17bf005009c 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/InlineResponse200.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/InlineResponse200.java
@@ -7,31 +7,23 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
-
import com.google.gson.annotations.SerializedName;
-
public class InlineResponse200 {
- @SerializedName("photoUrls")
- private List photoUrls = new ArrayList();
-
- @SerializedName("name")
- private String name = null;
-
- @SerializedName("id")
- private Long id = null;
-
- @SerializedName("category")
- private Object category = null;
-
@SerializedName("tags")
private List tags = new ArrayList();
-
+
+ @SerializedName("id")
+ private Long id = null;
+
+ @SerializedName("category")
+ private Object category = null;
+
public enum StatusEnum {
@SerializedName("available")
@@ -57,53 +49,13 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
-
- /**
- **/
- @ApiModelProperty(value = "")
- public List getPhotoUrls() {
- return photoUrls;
- }
- public void setPhotoUrls(List photoUrls) {
- this.photoUrls = photoUrls;
- }
+ @SerializedName("name")
+ private String name = null;
-
- /**
- **/
- @ApiModelProperty(value = "")
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
+ @SerializedName("photoUrls")
+ private List photoUrls = new ArrayList();
-
- /**
- **/
- @ApiModelProperty(required = true, value = "")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
- @ApiModelProperty(value = "")
- public Object getCategory() {
- return category;
- }
- public void setCategory(Object category) {
- this.category = category;
- }
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -114,7 +66,26 @@ public enum StatusEnum {
this.tags = tags;
}
-
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Object getCategory() {
+ return category;
+ }
+ public void setCategory(Object category) {
+ this.category = category;
+ }
+
/**
* pet status in the store
**/
@@ -126,7 +97,26 @@ public enum StatusEnum {
this.status = status;
}
-
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public List getPhotoUrls() {
+ return photoUrls;
+ }
+ public void setPhotoUrls(List photoUrls) {
+ this.photoUrls = photoUrls;
+ }
+
@Override
public boolean equals(Object o) {
@@ -137,17 +127,17 @@ public enum StatusEnum {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
- return Objects.equals(photoUrls, inlineResponse200.photoUrls) &&
- Objects.equals(name, inlineResponse200.name) &&
+ return Objects.equals(tags, inlineResponse200.tags) &&
Objects.equals(id, inlineResponse200.id) &&
Objects.equals(category, inlineResponse200.category) &&
- Objects.equals(tags, inlineResponse200.tags) &&
- Objects.equals(status, inlineResponse200.status);
+ Objects.equals(status, inlineResponse200.status) &&
+ Objects.equals(name, inlineResponse200.name) &&
+ Objects.equals(photoUrls, inlineResponse200.photoUrls);
}
@Override
public int hashCode() {
- return Objects.hash(photoUrls, name, id, category, tags, status);
+ return Objects.hash(tags, id, category, status, name, photoUrls);
}
@Override
@@ -155,12 +145,12 @@ public enum StatusEnum {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
- sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
- sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -176,5 +166,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java
index 80b0aed92a8a..3cbb15006fbc 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java
@@ -4,21 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing model name starting with number
+ **/
+@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
@SerializedName("name")
private Integer name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +28,6 @@ public class Model200Response {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +67,3 @@ public class Model200Response {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java
index ce8c1238fdb5..a3ecfb92156d 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java
@@ -4,21 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing reserved words
+ **/
+@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
@SerializedName("return")
private Integer _return = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +28,6 @@ public class ModelReturn {
this._return = _return;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +67,3 @@ public class ModelReturn {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java
index 370214bd21c6..fd90800298e5 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java
@@ -4,27 +4,26 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing model name same as property name
+ **/
+@ApiModel(description = "Model for testing model name same as property name")
public class Name {
@SerializedName("name")
private Integer name = null;
-
+
@SerializedName("snake_case")
private Integer snakeCase = null;
-
-
/**
**/
- @ApiModelProperty(value = "")
+ @ApiModelProperty(required = true, value = "")
public Integer getName() {
return name;
}
@@ -32,18 +31,13 @@ public class Name {
this.name = name;
}
-
/**
**/
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
- public void setSnakeCase(Integer snakeCase) {
- this.snakeCase = snakeCase;
- }
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Name {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Order.java
index e601bd7a15a0..f1fb2ad7409f 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Order.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Order.java
@@ -5,28 +5,26 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
-
import com.google.gson.annotations.SerializedName;
-
public class Order {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("petId")
private Long petId = null;
-
+
@SerializedName("quantity")
private Integer quantity = null;
-
+
@SerializedName("shipDate")
private Date shipDate = null;
-
+
public enum StatusEnum {
@SerializedName("placed")
@@ -52,12 +50,10 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
+
@SerializedName("complete")
private Boolean complete = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -65,7 +61,6 @@ public enum StatusEnum {
return id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -76,7 +71,6 @@ public enum StatusEnum {
this.petId = petId;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -87,7 +81,6 @@ public enum StatusEnum {
this.quantity = quantity;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -98,7 +91,6 @@ public enum StatusEnum {
this.shipDate = shipDate;
}
-
/**
* Order Status
**/
@@ -110,7 +102,6 @@ public enum StatusEnum {
this.status = status;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -121,7 +112,6 @@ public enum StatusEnum {
this.complete = complete;
}
-
@Override
public boolean equals(Object o) {
@@ -171,5 +161,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Pet.java
index 5d1210dc55b5..bcee581aa978 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Pet.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Pet.java
@@ -8,31 +8,29 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
-
import com.google.gson.annotations.SerializedName;
-
public class Pet {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("category")
private Category category = null;
-
+
@SerializedName("name")
private String name = null;
-
+
@SerializedName("photoUrls")
private List photoUrls = new ArrayList();
-
+
@SerializedName("tags")
private List tags = new ArrayList();
-
+
public enum StatusEnum {
@SerializedName("available")
@@ -58,9 +56,7 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -71,7 +67,6 @@ public enum StatusEnum {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -82,7 +77,6 @@ public enum StatusEnum {
this.category = category;
}
-
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -93,7 +87,6 @@ public enum StatusEnum {
this.name = name;
}
-
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -104,7 +97,6 @@ public enum StatusEnum {
this.photoUrls = photoUrls;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -115,7 +107,6 @@ public enum StatusEnum {
this.tags = tags;
}
-
/**
* pet status in the store
**/
@@ -127,7 +118,6 @@ public enum StatusEnum {
this.status = status;
}
-
@Override
public boolean equals(Object o) {
@@ -177,5 +167,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/SpecialModelName.java
index b5a96d5fc398..e2354b064b20 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -4,21 +4,17 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class SpecialModelName {
@SerializedName("$special[property.name]")
private Long specialPropertyName = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +25,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +64,3 @@ public class SpecialModelName {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Tag.java
index 6ee49ee21660..9c5ac6cf9a72 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Tag.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Tag.java
@@ -4,24 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class Tag {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("name")
private String name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -32,7 +28,6 @@ public class Tag {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -43,7 +38,6 @@ public class Tag {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Tag {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/User.java
index 98196393ef11..39e40837a6ab 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/User.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/User.java
@@ -4,42 +4,38 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class User {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("username")
private String username = null;
-
+
@SerializedName("firstName")
private String firstName = null;
-
+
@SerializedName("lastName")
private String lastName = null;
-
+
@SerializedName("email")
private String email = null;
-
+
@SerializedName("password")
private String password = null;
-
+
@SerializedName("phone")
private String phone = null;
-
+
@SerializedName("userStatus")
private Integer userStatus = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -50,7 +46,6 @@ public class User {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -61,7 +56,6 @@ public class User {
this.username = username;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -72,7 +66,6 @@ public class User {
this.firstName = firstName;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -83,7 +76,6 @@ public class User {
this.lastName = lastName;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -94,7 +86,6 @@ public class User {
this.email = email;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -105,7 +96,6 @@ public class User {
this.password = password;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -116,7 +106,6 @@ public class User {
this.phone = phone;
}
-
/**
* User Status
**/
@@ -128,7 +117,6 @@ public class User {
this.userStatus = userStatus;
}
-
@Override
public boolean equals(Object o) {
@@ -182,5 +170,3 @@ public class User {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/build.gradle b/samples/client/petstore/java/retrofit2rx/build.gradle
index c7139267298e..123bae25560b 100644
--- a/samples/client/petstore/java/retrofit2rx/build.gradle
+++ b/samples/client/petstore/java/retrofit2rx/build.gradle
@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.2'
- classpath 'com.github.dcendents:android-maven-plugin:1.2'
+ classpath 'com.android.tools.build:gradle:1.5.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.0'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
- targetSdkVersion 22
+ targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -46,6 +46,10 @@ if(hasProperty('target') && target == 'android') {
}
}
}
+
+ dependencies {
+ provided 'javax.annotation:jsr250-api:1.0'
+ }
}
afterEvaluate {
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/StringUtil.java
index e8c0dc4d0620..873647cb45e8 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/StringUtil.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/StringUtil.java
@@ -1,6 +1,6 @@
package io.swagger.client;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-07T09:11:59.834Z")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:37:27.438+02:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java
index 33d4760a6058..5f35286fb30f 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java
@@ -12,17 +12,12 @@ import io.swagger.client.model.Pet;
import io.swagger.client.model.InlineResponse200;
import java.io.File;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface PetApi {
-
/**
* Add a new pet to the store
*
@@ -35,7 +30,6 @@ public interface PetApi {
@Body Pet body
);
-
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
@@ -43,12 +37,11 @@ public interface PetApi {
* @return Call
*/
- @POST("pet?testing_byte_array=true")
+ @POST("pet?testing_byte_array=true")
Observable addPetUsingByteArray(
@Body byte[] body
);
-
/**
* Deletes a pet
*
@@ -62,7 +55,6 @@ public interface PetApi {
@Path("petId") Long petId, @Header("api_key") String apiKey
);
-
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
@@ -75,7 +67,6 @@ public interface PetApi {
@Query("status") List status
);
-
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
@@ -88,7 +79,6 @@ public interface PetApi {
@Query("tags") List tags
);
-
/**
* Find pet by ID
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -101,7 +91,6 @@ public interface PetApi {
@Path("petId") Long petId
);
-
/**
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -109,12 +98,11 @@ public interface PetApi {
* @return Call
*/
- @GET("pet/{petId}?response=inline_arbitrary_object")
+ @GET("pet/{petId}?response=inline_arbitrary_object")
Observable getPetByIdInObject(
@Path("petId") Long petId
);
-
/**
* Fake endpoint to test byte array return by 'Find pet by ID'
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
@@ -122,12 +110,11 @@ public interface PetApi {
* @return Call
*/
- @GET("pet/{petId}?testing_byte_array=true")
+ @GET("pet/{petId}?testing_byte_array=true")
Observable petPetIdtestingByteArraytrueGet(
@Path("petId") Long petId
);
-
/**
* Update an existing pet
*
@@ -140,7 +127,6 @@ public interface PetApi {
@Body Pet body
);
-
/**
* Updates a pet in the store with form data
*
@@ -156,7 +142,6 @@ public interface PetApi {
@Path("petId") String petId, @Field("name") String name, @Field("status") String status
);
-
/**
* uploads an image
*
@@ -172,6 +157,4 @@ public interface PetApi {
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java
index b4effc010dff..a0a60b0e3b6f 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java
@@ -10,17 +10,12 @@ import okhttp3.RequestBody;
import io.swagger.client.model.Order;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface StoreApi {
-
/**
* Delete purchase order by ID
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@@ -33,7 +28,6 @@ public interface StoreApi {
@Path("orderId") String orderId
);
-
/**
* Finds orders by status
* A single status value can be provided as a string
@@ -46,7 +40,6 @@ public interface StoreApi {
@Query("status") String status
);
-
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@@ -57,21 +50,19 @@ public interface StoreApi {
Observable> getInventory();
-
/**
* Fake endpoint to test arbitrary object return by 'Get inventory'
* Returns an arbitrary object which is actually a map of status codes to quantities
* @return Call
*/
- @GET("store/inventory?response=arbitrary_object")
+ @GET("store/inventory?response=arbitrary_object")
Observable getInventoryInObject();
-
/**
* Find purchase order by ID
- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Call
*/
@@ -81,7 +72,6 @@ public interface StoreApi {
@Path("orderId") String orderId
);
-
/**
* Place an order for a pet
*
@@ -94,6 +84,4 @@ public interface StoreApi {
@Body Order body
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java
index 6019e10711d7..e5a17e2bef92 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java
@@ -10,17 +10,12 @@ import okhttp3.RequestBody;
import io.swagger.client.model.User;
-
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
-
public interface UserApi {
-
/**
* Create user
* This can only be done by the logged in user.
@@ -33,7 +28,6 @@ public interface UserApi {
@Body User body
);
-
/**
* Creates list of users with given input array
*
@@ -46,7 +40,6 @@ public interface UserApi {
@Body List body
);
-
/**
* Creates list of users with given input array
*
@@ -59,7 +52,6 @@ public interface UserApi {
@Body List body
);
-
/**
* Delete user
* This can only be done by the logged in user.
@@ -72,11 +64,10 @@ public interface UserApi {
@Path("username") String username
);
-
/**
* Get user by user name
*
- * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return Call
*/
@@ -85,7 +76,6 @@ public interface UserApi {
@Path("username") String username
);
-
/**
* Logs user into the system
*
@@ -99,7 +89,6 @@ public interface UserApi {
@Query("username") String username, @Query("password") String password
);
-
/**
* Logs out current logged in user session
*
@@ -110,7 +99,6 @@ public interface UserApi {
Observable logoutUser();
-
/**
* Updated user
* This can only be done by the logged in user.
@@ -124,6 +112,4 @@ public interface UserApi {
@Path("username") String username, @Body User body
);
-
}
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Animal.java
new file mode 100644
index 000000000000..8df24899fb0b
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Animal.java
@@ -0,0 +1,66 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Animal animal = (Animal) o;
+ return Objects.equals(className, animal.className);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Animal {\n");
+
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Cat.java
new file mode 100644
index 000000000000..60a99ed86da2
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Cat.java
@@ -0,0 +1,82 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Cat extends Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ @SerializedName("declawed")
+ private Boolean declawed = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Boolean getDeclawed() {
+ return declawed;
+ }
+ public void setDeclawed(Boolean declawed) {
+ this.declawed = declawed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Cat cat = (Cat) o;
+ return Objects.equals(className, cat.className) &&
+ Objects.equals(declawed, cat.declawed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, declawed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Cat {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Category.java
index 67de63eb1792..93ec7bd0877c 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Category.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Category.java
@@ -4,24 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class Category {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("name")
private String name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -32,7 +28,6 @@ public class Category {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -43,7 +38,6 @@ public class Category {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Category {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Dog.java
new file mode 100644
index 000000000000..1c31fc93746b
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Dog.java
@@ -0,0 +1,82 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Animal;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class Dog extends Animal {
+
+ @SerializedName("className")
+ private String className = null;
+
+ @SerializedName("breed")
+ private String breed = null;
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getBreed() {
+ return breed;
+ }
+ public void setBreed(String breed) {
+ this.breed = breed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Dog dog = (Dog) o;
+ return Objects.equals(className, dog.className) &&
+ Objects.equals(breed, dog.breed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, breed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Dog {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/FormatTest.java
new file mode 100644
index 000000000000..29d17bbdfe70
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/FormatTest.java
@@ -0,0 +1,233 @@
+package io.swagger.client.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.google.gson.annotations.SerializedName;
+
+
+
+
+
+public class FormatTest {
+
+ @SerializedName("integer")
+ private Integer integer = null;
+
+ @SerializedName("int32")
+ private Integer int32 = null;
+
+ @SerializedName("int64")
+ private Long int64 = null;
+
+ @SerializedName("number")
+ private BigDecimal number = null;
+
+ @SerializedName("float")
+ private Float _float = null;
+
+ @SerializedName("double")
+ private Double _double = null;
+
+ @SerializedName("string")
+ private String string = null;
+
+ @SerializedName("byte")
+ private byte[] _byte = null;
+
+ @SerializedName("binary")
+ private byte[] binary = null;
+
+ @SerializedName("date")
+ private Date date = null;
+
+ @SerializedName("dateTime")
+ private Date dateTime = null;
+
+ @SerializedName("password")
+ private String password = null;
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getInteger() {
+ return integer;
+ }
+ public void setInteger(Integer integer) {
+ this.integer = integer;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getInt32() {
+ return int32;
+ }
+ public void setInt32(Integer int32) {
+ this.int32 = int32;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Long getInt64() {
+ return int64;
+ }
+ public void setInt64(Long int64) {
+ this.int64 = int64;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public BigDecimal getNumber() {
+ return number;
+ }
+ public void setNumber(BigDecimal number) {
+ this.number = number;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Float getFloat() {
+ return _float;
+ }
+ public void setFloat(Float _float) {
+ this._float = _float;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Double getDouble() {
+ return _double;
+ }
+ public void setDouble(Double _double) {
+ this._double = _double;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getString() {
+ return string;
+ }
+ public void setString(String string) {
+ this.string = string;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public byte[] getByte() {
+ return _byte;
+ }
+ public void setByte(byte[] _byte) {
+ this._byte = _byte;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public byte[] getBinary() {
+ return binary;
+ }
+ public void setBinary(byte[] binary) {
+ this.binary = binary;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Date getDate() {
+ return date;
+ }
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Date getDateTime() {
+ return dateTime;
+ }
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FormatTest formatTest = (FormatTest) o;
+ return Objects.equals(integer, formatTest.integer) &&
+ Objects.equals(int32, formatTest.int32) &&
+ Objects.equals(int64, formatTest.int64) &&
+ Objects.equals(number, formatTest.number) &&
+ Objects.equals(_float, formatTest._float) &&
+ Objects.equals(_double, formatTest._double) &&
+ Objects.equals(string, formatTest.string) &&
+ Objects.equals(_byte, formatTest._byte) &&
+ Objects.equals(binary, formatTest.binary) &&
+ Objects.equals(date, formatTest.date) &&
+ Objects.equals(dateTime, formatTest.dateTime) &&
+ Objects.equals(password, formatTest.password);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FormatTest {\n");
+
+ sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
+ sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
+ sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
+ sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
+ sb.append(" string: ").append(toIndentedString(string)).append("\n");
+ sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
+ sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
+ sb.append(" date: ").append(toIndentedString(date)).append("\n");
+ sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
+ sb.append(" password: ").append(toIndentedString(password)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/InlineResponse200.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/InlineResponse200.java
index 165f069a05b9..b17bf005009c 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/InlineResponse200.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/InlineResponse200.java
@@ -7,31 +7,23 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
-
import com.google.gson.annotations.SerializedName;
-
public class InlineResponse200 {
- @SerializedName("photoUrls")
- private List photoUrls = new ArrayList();
-
- @SerializedName("name")
- private String name = null;
-
- @SerializedName("id")
- private Long id = null;
-
- @SerializedName("category")
- private Object category = null;
-
@SerializedName("tags")
private List tags = new ArrayList();
-
+
+ @SerializedName("id")
+ private Long id = null;
+
+ @SerializedName("category")
+ private Object category = null;
+
public enum StatusEnum {
@SerializedName("available")
@@ -57,53 +49,13 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
-
- /**
- **/
- @ApiModelProperty(value = "")
- public List getPhotoUrls() {
- return photoUrls;
- }
- public void setPhotoUrls(List photoUrls) {
- this.photoUrls = photoUrls;
- }
+ @SerializedName("name")
+ private String name = null;
-
- /**
- **/
- @ApiModelProperty(value = "")
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
+ @SerializedName("photoUrls")
+ private List photoUrls = new ArrayList();
-
- /**
- **/
- @ApiModelProperty(required = true, value = "")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
- @ApiModelProperty(value = "")
- public Object getCategory() {
- return category;
- }
- public void setCategory(Object category) {
- this.category = category;
- }
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -114,7 +66,26 @@ public enum StatusEnum {
this.tags = tags;
}
-
+ /**
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public Object getCategory() {
+ return category;
+ }
+ public void setCategory(Object category) {
+ this.category = category;
+ }
+
/**
* pet status in the store
**/
@@ -126,7 +97,26 @@ public enum StatusEnum {
this.status = status;
}
-
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ **/
+ @ApiModelProperty(value = "")
+ public List getPhotoUrls() {
+ return photoUrls;
+ }
+ public void setPhotoUrls(List photoUrls) {
+ this.photoUrls = photoUrls;
+ }
+
@Override
public boolean equals(Object o) {
@@ -137,17 +127,17 @@ public enum StatusEnum {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
- return Objects.equals(photoUrls, inlineResponse200.photoUrls) &&
- Objects.equals(name, inlineResponse200.name) &&
+ return Objects.equals(tags, inlineResponse200.tags) &&
Objects.equals(id, inlineResponse200.id) &&
Objects.equals(category, inlineResponse200.category) &&
- Objects.equals(tags, inlineResponse200.tags) &&
- Objects.equals(status, inlineResponse200.status);
+ Objects.equals(status, inlineResponse200.status) &&
+ Objects.equals(name, inlineResponse200.name) &&
+ Objects.equals(photoUrls, inlineResponse200.photoUrls);
}
@Override
public int hashCode() {
- return Objects.hash(photoUrls, name, id, category, tags, status);
+ return Objects.hash(tags, id, category, status, name, photoUrls);
}
@Override
@@ -155,12 +145,12 @@ public enum StatusEnum {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
- sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
- sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -176,5 +166,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java
index 80b0aed92a8a..3cbb15006fbc 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java
@@ -4,21 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing model name starting with number
+ **/
+@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
@SerializedName("name")
private Integer name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +28,6 @@ public class Model200Response {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +67,3 @@ public class Model200Response {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java
index ce8c1238fdb5..a3ecfb92156d 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java
@@ -4,21 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing reserved words
+ **/
+@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
@SerializedName("return")
private Integer _return = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +28,6 @@ public class ModelReturn {
this._return = _return;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +67,3 @@ public class ModelReturn {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java
index 370214bd21c6..fd90800298e5 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java
@@ -4,27 +4,26 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
-
+/**
+ * Model for testing model name same as property name
+ **/
+@ApiModel(description = "Model for testing model name same as property name")
public class Name {
@SerializedName("name")
private Integer name = null;
-
+
@SerializedName("snake_case")
private Integer snakeCase = null;
-
-
/**
**/
- @ApiModelProperty(value = "")
+ @ApiModelProperty(required = true, value = "")
public Integer getName() {
return name;
}
@@ -32,18 +31,13 @@ public class Name {
this.name = name;
}
-
/**
**/
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
- public void setSnakeCase(Integer snakeCase) {
- this.snakeCase = snakeCase;
- }
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Name {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Order.java
index e601bd7a15a0..f1fb2ad7409f 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Order.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Order.java
@@ -5,28 +5,26 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
-
import com.google.gson.annotations.SerializedName;
-
public class Order {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("petId")
private Long petId = null;
-
+
@SerializedName("quantity")
private Integer quantity = null;
-
+
@SerializedName("shipDate")
private Date shipDate = null;
-
+
public enum StatusEnum {
@SerializedName("placed")
@@ -52,12 +50,10 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
+
@SerializedName("complete")
private Boolean complete = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -65,7 +61,6 @@ public enum StatusEnum {
return id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -76,7 +71,6 @@ public enum StatusEnum {
this.petId = petId;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -87,7 +81,6 @@ public enum StatusEnum {
this.quantity = quantity;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -98,7 +91,6 @@ public enum StatusEnum {
this.shipDate = shipDate;
}
-
/**
* Order Status
**/
@@ -110,7 +102,6 @@ public enum StatusEnum {
this.status = status;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -121,7 +112,6 @@ public enum StatusEnum {
this.complete = complete;
}
-
@Override
public boolean equals(Object o) {
@@ -171,5 +161,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Pet.java
index 5d1210dc55b5..bcee581aa978 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Pet.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Pet.java
@@ -8,31 +8,29 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
-
import com.google.gson.annotations.SerializedName;
-
public class Pet {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("category")
private Category category = null;
-
+
@SerializedName("name")
private String name = null;
-
+
@SerializedName("photoUrls")
private List photoUrls = new ArrayList();
-
+
@SerializedName("tags")
private List tags = new ArrayList();
-
+
public enum StatusEnum {
@SerializedName("available")
@@ -58,9 +56,7 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -71,7 +67,6 @@ public enum StatusEnum {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -82,7 +77,6 @@ public enum StatusEnum {
this.category = category;
}
-
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -93,7 +87,6 @@ public enum StatusEnum {
this.name = name;
}
-
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -104,7 +97,6 @@ public enum StatusEnum {
this.photoUrls = photoUrls;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -115,7 +107,6 @@ public enum StatusEnum {
this.tags = tags;
}
-
/**
* pet status in the store
**/
@@ -127,7 +118,6 @@ public enum StatusEnum {
this.status = status;
}
-
@Override
public boolean equals(Object o) {
@@ -177,5 +167,3 @@ public enum StatusEnum {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/SpecialModelName.java
index b5a96d5fc398..e2354b064b20 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -4,21 +4,17 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class SpecialModelName {
@SerializedName("$special[property.name]")
private Long specialPropertyName = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -29,7 +25,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
-
@Override
public boolean equals(Object o) {
@@ -69,5 +64,3 @@ public class SpecialModelName {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Tag.java
index 6ee49ee21660..9c5ac6cf9a72 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Tag.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Tag.java
@@ -4,24 +4,20 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class Tag {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("name")
private String name = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -32,7 +28,6 @@ public class Tag {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -43,7 +38,6 @@ public class Tag {
this.name = name;
}
-
@Override
public boolean equals(Object o) {
@@ -85,5 +79,3 @@ public class Tag {
return o.toString().replace("\n", "\n ");
}
}
-
-
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/User.java
index 98196393ef11..39e40837a6ab 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/User.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/User.java
@@ -4,42 +4,38 @@ import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-
import com.google.gson.annotations.SerializedName;
-
public class User {
@SerializedName("id")
private Long id = null;
-
+
@SerializedName("username")
private String username = null;
-
+
@SerializedName("firstName")
private String firstName = null;
-
+
@SerializedName("lastName")
private String lastName = null;
-
+
@SerializedName("email")
private String email = null;
-
+
@SerializedName("password")
private String password = null;
-
+
@SerializedName("phone")
private String phone = null;
-
+
@SerializedName("userStatus")
private Integer userStatus = null;
-
-
/**
**/
@ApiModelProperty(value = "")
@@ -50,7 +46,6 @@ public class User {
this.id = id;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -61,7 +56,6 @@ public class User {
this.username = username;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -72,7 +66,6 @@ public class User {
this.firstName = firstName;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -83,7 +76,6 @@ public class User {
this.lastName = lastName;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -94,7 +86,6 @@ public class User {
this.email = email;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -105,7 +96,6 @@ public class User {
this.password = password;
}
-
/**
**/
@ApiModelProperty(value = "")
@@ -116,7 +106,6 @@ public class User {
this.phone = phone;
}
-
/**
* User Status
**/
@@ -128,7 +117,6 @@ public class User {
this.userStatus = userStatus;
}
-
@Override
public boolean equals(Object o) {
@@ -182,5 +170,3 @@ public class User {
return o.toString().replace("\n", "\n ");
}
}
-
-