From ab34dc56979b2acc2ecad697169e6a2ca0ccceee Mon Sep 17 00:00:00 2001 From: xhh Date: Thu, 8 Oct 2015 21:21:43 +0800 Subject: [PATCH] Rebuild Java cilents of the Petstore sample --- .../java/io/swagger/client/api/PetApi.java | 72 ++++++++--------- .../java/io/swagger/client/api/StoreApi.java | 41 ++++------ .../java/io/swagger/client/api/UserApi.java | 63 +++++++-------- .../java/io/swagger/client/model/Order.java | 9 +-- .../java/io/swagger/client/model/Pet.java | 15 ++-- .../java/io/swagger/client/api/PetApi.java | 68 +++++++--------- .../java/io/swagger/client/api/StoreApi.java | 39 ++++----- .../java/io/swagger/client/api/UserApi.java | 61 +++++++------- .../java/io/swagger/client/model/Order.java | 13 +-- .../java/io/swagger/client/model/Pet.java | 19 ++--- .../java/io/swagger/client/api/PetApi.java | 78 +++++++++--------- .../java/io/swagger/client/api/StoreApi.java | 41 ++++------ .../java/io/swagger/client/api/UserApi.java | 67 +++++++-------- .../java/io/swagger/client/model/Order.java | 7 +- .../java/io/swagger/client/model/Pet.java | 13 ++- .../java/io/swagger/client/api/PetApi.java | 81 +++++++++---------- .../java/io/swagger/client/api/StoreApi.java | 40 +++++---- .../java/io/swagger/client/api/UserApi.java | 74 +++++++++-------- .../java/io/swagger/client/model/Order.java | 7 +- .../java/io/swagger/client/model/Pet.java | 13 ++- 20 files changed, 373 insertions(+), 448 deletions(-) diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/PetApi.java index ca9111f417..4f503f934c 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/PetApi.java @@ -6,18 +6,10 @@ import io.swagger.client.Configuration; import io.swagger.client.Pair; import io.swagger.client.TypeRef; -import io.swagger.client.model.*; - -import java.util.*; - import io.swagger.client.model.Pet; import java.io.File; -import java.io.File; -import java.util.Map; -import java.util.HashMap; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-30T16:27:52.437+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:43.997+08:00") public class PetApi { private ApiClient apiClient; @@ -52,9 +44,9 @@ public class PetApi { String path = "/pet".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -99,9 +91,9 @@ public class PetApi { String path = "/pet".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -136,9 +128,9 @@ public class PetApi { * Finds Pets by status * Multiple status values can be provided with comma seperated strings * @param status Status values that need to be considered for filter - * @return List + * @return java.util.List */ - public List findPetsByStatus (List status) throws ApiException { + public java.util.List findPetsByStatus (java.util.List status) throws ApiException { Object postBody = null; byte[] postBinaryBody = null; @@ -146,9 +138,9 @@ public class PetApi { String path = "/pet/findByStatus".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); queryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); @@ -174,7 +166,7 @@ public class PetApi { - TypeRef returnType = new TypeRef>() {}; + TypeRef returnType = new TypeRef>() {}; return apiClient.invokeAPI(path, "GET", queryParams, postBody, postBinaryBody, headerParams, formParams, accept, contentType, authNames, returnType); @@ -186,9 +178,9 @@ public class PetApi { * Finds Pets by tags * Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by - * @return List + * @return java.util.List */ - public List findPetsByTags (List tags) throws ApiException { + public java.util.List findPetsByTags (java.util.List tags) throws ApiException { Object postBody = null; byte[] postBinaryBody = null; @@ -196,9 +188,9 @@ public class PetApi { String path = "/pet/findByTags".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); queryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags)); @@ -224,7 +216,7 @@ public class PetApi { - TypeRef returnType = new TypeRef>() {}; + TypeRef returnType = new TypeRef>() {}; return apiClient.invokeAPI(path, "GET", queryParams, postBody, postBinaryBody, headerParams, formParams, accept, contentType, authNames, returnType); @@ -252,9 +244,9 @@ public class PetApi { .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -272,7 +264,7 @@ public class PetApi { }; final String contentType = apiClient.selectHeaderContentType(contentTypes); - String[] authNames = new String[] { "api_key", "petstore_auth" }; + String[] authNames = new String[] { "petstore_auth", "api_key" }; @@ -308,9 +300,9 @@ public class PetApi { .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -366,9 +358,9 @@ public class PetApi { .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -423,9 +415,9 @@ public class PetApi { .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/StoreApi.java index f0628c595c..4d861dcb5d 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/StoreApi.java @@ -6,18 +6,9 @@ import io.swagger.client.Configuration; import io.swagger.client.Pair; import io.swagger.client.TypeRef; -import io.swagger.client.model.*; - -import java.util.*; - -import java.util.Map; import io.swagger.client.model.Order; -import java.io.File; -import java.util.Map; -import java.util.HashMap; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-30T16:27:52.437+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:43.997+08:00") public class StoreApi { private ApiClient apiClient; @@ -41,9 +32,9 @@ public class StoreApi { /** * Returns pet inventories by status * Returns a map of status codes to quantities - * @return Map + * @return java.util.Map */ - public Map getInventory () throws ApiException { + public java.util.Map getInventory () throws ApiException { Object postBody = null; byte[] postBinaryBody = null; @@ -51,9 +42,9 @@ public class StoreApi { String path = "/store/inventory".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -77,7 +68,7 @@ public class StoreApi { - TypeRef returnType = new TypeRef>() {}; + TypeRef returnType = new TypeRef>() {}; return apiClient.invokeAPI(path, "GET", queryParams, postBody, postBinaryBody, headerParams, formParams, accept, contentType, authNames, returnType); @@ -99,9 +90,9 @@ public class StoreApi { String path = "/store/order".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -153,9 +144,9 @@ public class StoreApi { .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -207,9 +198,9 @@ public class StoreApi { .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/UserApi.java index 3412c565b3..e2e0e90b18 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/api/UserApi.java @@ -6,18 +6,9 @@ import io.swagger.client.Configuration; import io.swagger.client.Pair; import io.swagger.client.TypeRef; -import io.swagger.client.model.*; - -import java.util.*; - import io.swagger.client.model.User; -import java.util.*; -import java.io.File; -import java.util.Map; -import java.util.HashMap; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-30T16:27:52.437+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:43.997+08:00") public class UserApi { private ApiClient apiClient; @@ -52,9 +43,9 @@ public class UserApi { String path = "/user".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -91,7 +82,7 @@ public class UserApi { * @param body List of user object * @return void */ - public void createUsersWithArrayInput (List body) throws ApiException { + public void createUsersWithArrayInput (java.util.List body) throws ApiException { Object postBody = body; byte[] postBinaryBody = null; @@ -99,9 +90,9 @@ public class UserApi { String path = "/user/createWithArray".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -138,7 +129,7 @@ public class UserApi { * @param body List of user object * @return void */ - public void createUsersWithListInput (List body) throws ApiException { + public void createUsersWithListInput (java.util.List body) throws ApiException { Object postBody = body; byte[] postBinaryBody = null; @@ -146,9 +137,9 @@ public class UserApi { String path = "/user/createWithList".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -194,9 +185,9 @@ public class UserApi { String path = "/user/login".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); queryParams.addAll(apiClient.parameterToPairs("", "username", username)); @@ -245,9 +236,9 @@ public class UserApi { String path = "/user/logout".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -298,9 +289,9 @@ public class UserApi { .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -353,9 +344,9 @@ public class UserApi { .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -406,9 +397,9 @@ public class UserApi { .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Order.java index b51be0c52e..22320fbb39 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Order.java @@ -1,7 +1,6 @@ package io.swagger.client.model; import io.swagger.client.StringUtil; -import java.util.Date; @@ -10,13 +9,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; @ApiModel(description = "") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-30T16:27:52.437+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:43.997+08:00") public class Order { private Long id = null; private Long petId = null; private Integer quantity = null; - private Date shipDate = null; + private java.util.Date shipDate = null; public enum StatusEnum { PLACED("placed"), @@ -79,10 +78,10 @@ public enum StatusEnum { **/ @ApiModelProperty(value = "") @JsonProperty("shipDate") - public Date getShipDate() { + public java.util.Date getShipDate() { return shipDate; } - public void setShipDate(Date shipDate) { + public void setShipDate(java.util.Date shipDate) { this.shipDate = shipDate; } diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Pet.java index aca4848ff9..fc0db631e6 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Pet.java @@ -3,7 +3,6 @@ package io.swagger.client.model; import io.swagger.client.StringUtil; import io.swagger.client.model.Category; import io.swagger.client.model.Tag; -import java.util.*; @@ -12,14 +11,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; @ApiModel(description = "") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-30T16:27:52.437+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:43.997+08:00") public class Pet { private Long id = null; private Category category = null; private String name = null; - private List photoUrls = new ArrayList(); - private List tags = new ArrayList(); + private java.util.List photoUrls = new java.util.ArrayList(); + private java.util.List tags = new java.util.ArrayList(); public enum StatusEnum { AVAILABLE("available"), @@ -81,10 +80,10 @@ public enum StatusEnum { **/ @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public java.util.List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(java.util.List photoUrls) { this.photoUrls = photoUrls; } @@ -93,10 +92,10 @@ public enum StatusEnum { **/ @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { + public java.util.List getTags() { return tags; } - public void setTags(List tags) { + public void setTags(java.util.List tags) { this.tags = tags; } 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 26e0f275c8..56c0b1e173 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 @@ -8,16 +8,10 @@ import io.swagger.client.TypeRef; import io.swagger.client.model.*; -import java.util.*; - import io.swagger.client.model.Pet; import java.io.File; -import java.io.File; -import java.util.Map; -import java.util.HashMap; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:48.684+08:00") public class PetApi { private ApiClient apiClient; @@ -51,9 +45,9 @@ public class PetApi { String path = "/pet".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -91,9 +85,9 @@ public class PetApi { String path = "/pet".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -122,18 +116,18 @@ public class PetApi { * Finds Pets by status * Multiple status values can be provided with comma seperated strings * @param status Status values that need to be considered for filter - * @return List + * @return java.util.List */ - public List findPetsByStatus (List status) throws ApiException { + public java.util.List findPetsByStatus (java.util.List status) throws ApiException { Object postBody = null; // create path and map variables String path = "/pet/findByStatus".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); queryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); @@ -156,7 +150,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; - TypeRef returnType = new TypeRef>() {}; + TypeRef returnType = new TypeRef>() {}; return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } @@ -165,18 +159,18 @@ public class PetApi { * Finds Pets by tags * Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by - * @return List + * @return java.util.List */ - public List findPetsByTags (List tags) throws ApiException { + public java.util.List findPetsByTags (java.util.List tags) throws ApiException { Object postBody = null; // create path and map variables String path = "/pet/findByTags".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); queryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags)); @@ -199,7 +193,7 @@ public class PetApi { String[] authNames = new String[] { "petstore_auth" }; - TypeRef returnType = new TypeRef>() {}; + TypeRef returnType = new TypeRef>() {}; return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } @@ -223,9 +217,9 @@ public class PetApi { .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -272,9 +266,9 @@ public class PetApi { .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -323,9 +317,9 @@ public class PetApi { .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -373,9 +367,9 @@ public class PetApi { .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); 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 c95256c69a..5f8a9fb13d 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 @@ -8,16 +8,9 @@ import io.swagger.client.TypeRef; import io.swagger.client.model.*; -import java.util.*; - -import java.util.Map; import io.swagger.client.model.Order; -import java.io.File; -import java.util.Map; -import java.util.HashMap; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:48.684+08:00") public class StoreApi { private ApiClient apiClient; @@ -41,18 +34,18 @@ public class StoreApi { /** * Returns pet inventories by status * Returns a map of status codes to quantities - * @return Map + * @return java.util.Map */ - public Map getInventory () throws ApiException { + public java.util.Map getInventory () throws ApiException { Object postBody = null; // create path and map variables String path = "/store/inventory".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -73,7 +66,7 @@ public class StoreApi { String[] authNames = new String[] { "api_key" }; - TypeRef returnType = new TypeRef>() {}; + TypeRef returnType = new TypeRef>() {}; return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } @@ -91,9 +84,9 @@ public class StoreApi { String path = "/store/order".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -138,9 +131,9 @@ public class StoreApi { .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -185,9 +178,9 @@ public class StoreApi { .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java index 26c8d4b035..36199161b1 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java @@ -8,16 +8,9 @@ import io.swagger.client.TypeRef; import io.swagger.client.model.*; -import java.util.*; - import io.swagger.client.model.User; -import java.util.*; -import java.io.File; -import java.util.Map; -import java.util.HashMap; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:48.684+08:00") public class UserApi { private ApiClient apiClient; @@ -51,9 +44,9 @@ public class UserApi { String path = "/user".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -84,16 +77,16 @@ public class UserApi { * @param body List of user object * @return void */ - public void createUsersWithArrayInput (List body) throws ApiException { + public void createUsersWithArrayInput (java.util.List body) throws ApiException { Object postBody = body; // create path and map variables String path = "/user/createWithArray".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -124,16 +117,16 @@ public class UserApi { * @param body List of user object * @return void */ - public void createUsersWithListInput (List body) throws ApiException { + public void createUsersWithListInput (java.util.List body) throws ApiException { Object postBody = body; // create path and map variables String path = "/user/createWithList".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -172,9 +165,9 @@ public class UserApi { String path = "/user/login".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); queryParams.addAll(apiClient.parameterToPairs("", "username", username)); @@ -216,9 +209,9 @@ public class UserApi { String path = "/user/logout".replaceAll("\\{format\\}","json"); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -262,9 +255,9 @@ public class UserApi { .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -310,9 +303,9 @@ public class UserApi { .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); @@ -356,9 +349,9 @@ public class UserApi { .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map formParams = new HashMap(); + java.util.List queryParams = new java.util.ArrayList(); + java.util.Map headerParams = new java.util.HashMap(); + java.util.Map formParams = new java.util.HashMap(); diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Order.java index 868c59a783..5b952459dd 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Order.java @@ -1,7 +1,6 @@ package io.swagger.client.model; import io.swagger.client.StringUtil; -import java.util.Date; @@ -10,16 +9,18 @@ import com.fasterxml.jackson.annotation.JsonProperty; @ApiModel(description = "") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:48.684+08:00") public class Order { private Long id = null; private Long petId = null; private Integer quantity = null; - private Date shipDate = null; + private java.util.Date shipDate = null; public enum StatusEnum { - PLACED("placed"), APPROVED("approved"), DELIVERED("delivered"); + PLACED("placed"), + APPROVED("approved"), + DELIVERED("delivered"); private String value; @@ -77,10 +78,10 @@ public enum StatusEnum { **/ @ApiModelProperty(value = "") @JsonProperty("shipDate") - public Date getShipDate() { + public java.util.Date getShipDate() { return shipDate; } - public void setShipDate(Date shipDate) { + public void setShipDate(java.util.Date shipDate) { this.shipDate = shipDate; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Pet.java index 2a4a0b6c93..1e205686fd 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Pet.java @@ -2,7 +2,6 @@ package io.swagger.client.model; import io.swagger.client.StringUtil; import io.swagger.client.model.Category; -import java.util.*; import io.swagger.client.model.Tag; @@ -12,17 +11,19 @@ import com.fasterxml.jackson.annotation.JsonProperty; @ApiModel(description = "") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-08T20:57:48.684+08:00") public class Pet { private Long id = null; private Category category = null; private String name = null; - private List photoUrls = new ArrayList(); - private List tags = new ArrayList(); + private java.util.List photoUrls = new java.util.ArrayList(); + private java.util.List tags = new java.util.ArrayList(); public enum StatusEnum { - AVAILABLE("available"), PENDING("pending"), SOLD("sold"); + AVAILABLE("available"), + PENDING("pending"), + SOLD("sold"); private String value; @@ -79,10 +80,10 @@ public enum StatusEnum { **/ @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - public List getPhotoUrls() { + public java.util.List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(java.util.List photoUrls) { this.photoUrls = photoUrls; } @@ -91,10 +92,10 @@ public enum StatusEnum { **/ @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { + public java.util.List getTags() { return tags; } - public void setTags(List tags) { + public void setTags(java.util.List tags) { this.tags = tags; } 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 debe576dc9..78bde83307 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 @@ -14,15 +14,9 @@ import com.squareup.okhttp.Call; import java.lang.reflect.Type; -import java.util.*; - import io.swagger.client.model.Pet; import java.io.File; -import java.io.File; -import java.util.Map; -import java.util.HashMap; - public class PetApi { private ApiClient apiClient; @@ -51,11 +45,11 @@ public class PetApi { // create path and map variables String path = "/pet".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -104,11 +98,11 @@ public class PetApi { // create path and map variables String path = "/pet".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -150,20 +144,20 @@ public class PetApi { } /* Build call for findPetsByStatus */ - private Call findPetsByStatusCall(List status) throws ApiException { + private Call findPetsByStatusCall(java.util.List status) throws ApiException { Object postBody = null; // create path and map variables String path = "/pet/findByStatus".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); if (status != null) queryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -185,11 +179,11 @@ public class PetApi { * Finds Pets by status * Multiple status values can be provided with comma seperated strings * @param status Status values that need to be considered for filter - * @return List + * @return java.util.List */ - public List findPetsByStatus(List status) throws ApiException { + public java.util.List findPetsByStatus(java.util.List status) throws ApiException { Call call = findPetsByStatusCall(status); - Type returnType = new TypeToken>(){}.getType(); + Type returnType = new TypeToken>(){}.getType(); return apiClient.execute(call, returnType); } @@ -200,28 +194,28 @@ public class PetApi { * @param callback The callback to be executed when the API call finishes * @return The request call */ - public Call findPetsByStatusAsync(List status, ApiCallback> callback) throws ApiException { + public Call findPetsByStatusAsync(java.util.List status, ApiCallback> callback) throws ApiException { Call call = findPetsByStatusCall(status); - Type returnType = new TypeToken>(){}.getType(); + Type returnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, returnType, callback); return call; } /* Build call for findPetsByTags */ - private Call findPetsByTagsCall(List tags) throws ApiException { + private Call findPetsByTagsCall(java.util.List tags) throws ApiException { Object postBody = null; // create path and map variables String path = "/pet/findByTags".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); if (tags != null) queryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags)); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -243,11 +237,11 @@ public class PetApi { * Finds Pets by tags * Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by - * @return List + * @return java.util.List */ - public List findPetsByTags(List tags) throws ApiException { + public java.util.List findPetsByTags(java.util.List tags) throws ApiException { Call call = findPetsByTagsCall(tags); - Type returnType = new TypeToken>(){}.getType(); + Type returnType = new TypeToken>(){}.getType(); return apiClient.execute(call, returnType); } @@ -258,9 +252,9 @@ public class PetApi { * @param callback The callback to be executed when the API call finishes * @return The request call */ - public Call findPetsByTagsAsync(List tags, ApiCallback> callback) throws ApiException { + public Call findPetsByTagsAsync(java.util.List tags, ApiCallback> callback) throws ApiException { Call call = findPetsByTagsCall(tags); - Type returnType = new TypeToken>(){}.getType(); + Type returnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, returnType, callback); return call; } @@ -279,11 +273,11 @@ public class PetApi { String path = "/pet/{petId}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -341,11 +335,11 @@ public class PetApi { String path = "/pet/{petId}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); if (name != null) formParams.put("name", name); if (status != null) @@ -408,13 +402,13 @@ public class PetApi { String path = "/pet/{petId}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); if (apiKey != null) headerParams.put("api_key", apiClient.parameterToString(apiKey)); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -471,11 +465,11 @@ public class PetApi { String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); if (additionalMetadata != null) formParams.put("additionalMetadata", additionalMetadata); if (file != null) 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 a3fb14bb52..ff7f02ecf5 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 @@ -14,15 +14,8 @@ import com.squareup.okhttp.Call; import java.lang.reflect.Type; -import java.util.*; - -import java.util.Map; import io.swagger.client.model.Order; -import java.io.File; -import java.util.Map; -import java.util.HashMap; - public class StoreApi { private ApiClient apiClient; @@ -51,11 +44,11 @@ public class StoreApi { // create path and map variables String path = "/store/inventory".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -76,11 +69,11 @@ public class StoreApi { /** * Returns pet inventories by status * Returns a map of status codes to quantities - * @return Map + * @return java.util.Map */ - public Map getInventory() throws ApiException { + public java.util.Map getInventory() throws ApiException { Call call = getInventoryCall(); - Type returnType = new TypeToken>(){}.getType(); + Type returnType = new TypeToken>(){}.getType(); return apiClient.execute(call, returnType); } @@ -90,9 +83,9 @@ public class StoreApi { * @param callback The callback to be executed when the API call finishes * @return The request call */ - public Call getInventoryAsync(ApiCallback> callback) throws ApiException { + public Call getInventoryAsync(ApiCallback> callback) throws ApiException { Call call = getInventoryCall(); - Type returnType = new TypeToken>(){}.getType(); + Type returnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, returnType, callback); return call; } @@ -105,11 +98,11 @@ public class StoreApi { // create path and map variables String path = "/store/order".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -167,11 +160,11 @@ public class StoreApi { String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -229,11 +222,11 @@ public class StoreApi { String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" 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 ce1bae64a4..dccd7003b2 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 @@ -14,14 +14,7 @@ import com.squareup.okhttp.Call; import java.lang.reflect.Type; -import java.util.*; - import io.swagger.client.model.User; -import java.util.*; - -import java.io.File; -import java.util.Map; -import java.util.HashMap; public class UserApi { private ApiClient apiClient; @@ -51,11 +44,11 @@ public class UserApi { // create path and map variables String path = "/user".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -97,18 +90,18 @@ public class UserApi { } /* Build call for createUsersWithArrayInput */ - private Call createUsersWithArrayInputCall(List body) throws ApiException { + private Call createUsersWithArrayInputCall(java.util.List body) throws ApiException { Object postBody = body; // create path and map variables String path = "/user/createWithArray".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -131,7 +124,7 @@ public class UserApi { * * @param body List of user object */ - public void createUsersWithArrayInput(List body) throws ApiException { + public void createUsersWithArrayInput(java.util.List body) throws ApiException { Call call = createUsersWithArrayInputCall(body); apiClient.execute(call); } @@ -143,25 +136,25 @@ public class UserApi { * @param callback The callback to be executed when the API call finishes * @return The request call */ - public Call createUsersWithArrayInputAsync(List body, ApiCallback callback) throws ApiException { + public Call createUsersWithArrayInputAsync(java.util.List body, ApiCallback callback) throws ApiException { Call call = createUsersWithArrayInputCall(body); apiClient.executeAsync(call, callback); return call; } /* Build call for createUsersWithListInput */ - private Call createUsersWithListInputCall(List body) throws ApiException { + private Call createUsersWithListInputCall(java.util.List body) throws ApiException { Object postBody = body; // create path and map variables String path = "/user/createWithList".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -184,7 +177,7 @@ public class UserApi { * * @param body List of user object */ - public void createUsersWithListInput(List body) throws ApiException { + public void createUsersWithListInput(java.util.List body) throws ApiException { Call call = createUsersWithListInputCall(body); apiClient.execute(call); } @@ -196,7 +189,7 @@ public class UserApi { * @param callback The callback to be executed when the API call finishes * @return The request call */ - public Call createUsersWithListInputAsync(List body, ApiCallback callback) throws ApiException { + public Call createUsersWithListInputAsync(java.util.List body, ApiCallback callback) throws ApiException { Call call = createUsersWithListInputCall(body); apiClient.executeAsync(call, callback); return call; @@ -210,15 +203,15 @@ public class UserApi { // create path and map variables String path = "/user/login".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); if (username != null) queryParams.addAll(apiClient.parameterToPairs("", "username", username)); if (password != null) queryParams.addAll(apiClient.parameterToPairs("", "password", password)); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -272,11 +265,11 @@ public class UserApi { // create path and map variables String path = "/user/logout".replaceAll("\\{format\\}","json"); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -329,11 +322,11 @@ public class UserApi { String path = "/user/{username}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -391,11 +384,11 @@ public class UserApi { String path = "/user/{username}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" @@ -452,11 +445,11 @@ public class UserApi { String path = "/user/{username}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); - List queryParams = new ArrayList(); + java.util.List queryParams = new java.util.ArrayList(); - Map headerParams = new HashMap(); + java.util.Map headerParams = new java.util.HashMap(); - Map formParams = new HashMap(); + java.util.Map formParams = new java.util.HashMap(); final String[] accepts = { "application/json", "application/xml" 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 df8e77b6fb..57c9f791e9 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 @@ -1,7 +1,6 @@ package io.swagger.client.model; import io.swagger.client.StringUtil; -import java.util.Date; import com.google.gson.annotations.SerializedName; @@ -24,7 +23,7 @@ public class Order { private Integer quantity = null; @SerializedName("shipDate") - private Date shipDate = null; + private java.util.Date shipDate = null; public enum StatusEnum { @@ -93,10 +92,10 @@ public enum StatusEnum { /** **/ @ApiModelProperty(value = "") - public Date getShipDate() { + public java.util.Date getShipDate() { return shipDate; } - public void setShipDate(Date shipDate) { + public void setShipDate(java.util.Date shipDate) { this.shipDate = shipDate; } 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 9ab5457e26..4b214d56c0 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 @@ -2,7 +2,6 @@ package io.swagger.client.model; import io.swagger.client.StringUtil; import io.swagger.client.model.Category; -import java.util.*; import io.swagger.client.model.Tag; import com.google.gson.annotations.SerializedName; @@ -26,10 +25,10 @@ public class Pet { private String name = null; @SerializedName("photoUrls") - private List photoUrls = new ArrayList(); + private java.util.List photoUrls = new java.util.ArrayList(); @SerializedName("tags") - private List tags = new ArrayList(); + private java.util.List tags = new java.util.ArrayList(); public enum StatusEnum { @@ -95,10 +94,10 @@ public enum StatusEnum { /** **/ @ApiModelProperty(required = true, value = "") - public List getPhotoUrls() { + public java.util.List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(java.util.List photoUrls) { this.photoUrls = photoUrls; } @@ -106,10 +105,10 @@ public enum StatusEnum { /** **/ @ApiModelProperty(value = "") - public List getTags() { + public java.util.List getTags() { return tags; } - public void setTags(List tags) { + public void setTags(java.util.List tags) { this.tags = tags; } 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 cd4dbe866a..568e17b6cf 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 @@ -5,7 +5,6 @@ import io.swagger.client.model.*; import retrofit.Callback; import retrofit.http.*; import retrofit.mime.*; -import java.util.*; import io.swagger.client.model.Pet; import java.io.File; @@ -20,7 +19,7 @@ public interface PetApi { * @return Void */ - @PUT("/pet") + @PUT("/pet") Void updatePet( @Body Pet body ); @@ -29,14 +28,14 @@ public interface PetApi { * Update an existing pet * Async method * @param body Pet object that needs to be added to the store - * @param cb callback method + * @param cb callback method * @return void */ - @PUT("/pet") + @PUT("/pet") void updatePet( @Body Pet body, Callback cb - ); + ); /** * Add a new pet to the store @@ -46,7 +45,7 @@ public interface PetApi { * @return Void */ - @POST("/pet") + @POST("/pet") Void addPet( @Body Pet body ); @@ -55,66 +54,66 @@ public interface PetApi { * Add a new pet to the store * Async method * @param body Pet object that needs to be added to the store - * @param cb callback method + * @param cb callback method * @return void */ - @POST("/pet") + @POST("/pet") void addPet( @Body Pet body, Callback cb - ); + ); /** * Finds Pets by status * Sync method * Multiple status values can be provided with comma seperated strings * @param status Status values that need to be considered for filter - * @return List + * @return java.util.List */ - @GET("/pet/findByStatus") - List findPetsByStatus( - @Query("status") List status + @GET("/pet/findByStatus") + java.util.List findPetsByStatus( + @Query("status") java.util.List status ); /** * Finds Pets by status * Async method * @param status Status values that need to be considered for filter - * @param cb callback method + * @param cb callback method * @return void */ - @GET("/pet/findByStatus") + @GET("/pet/findByStatus") void findPetsByStatus( - @Query("status") List status, Callback> cb - ); + @Query("status") java.util.List status, Callback> cb + ); /** * Finds Pets by tags * Sync method * Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by - * @return List + * @return java.util.List */ - @GET("/pet/findByTags") - List findPetsByTags( - @Query("tags") List tags + @GET("/pet/findByTags") + java.util.List findPetsByTags( + @Query("tags") java.util.List tags ); /** * Finds Pets by tags * Async method * @param tags Tags to filter by - * @param cb callback method + * @param cb callback method * @return void */ - @GET("/pet/findByTags") + @GET("/pet/findByTags") void findPetsByTags( - @Query("tags") List tags, Callback> cb - ); + @Query("tags") java.util.List tags, Callback> cb + ); /** * Find pet by ID @@ -124,7 +123,7 @@ public interface PetApi { * @return Pet */ - @GET("/pet/{petId}") + @GET("/pet/{petId}") Pet getPetById( @Path("petId") Long petId ); @@ -133,14 +132,14 @@ public interface PetApi { * Find pet by ID * Async method * @param petId ID of pet that needs to be fetched - * @param cb callback method + * @param cb callback method * @return void */ - @GET("/pet/{petId}") + @GET("/pet/{petId}") void getPetById( @Path("petId") Long petId, Callback cb - ); + ); /** * Updates a pet in the store with form data @@ -153,7 +152,7 @@ public interface PetApi { */ @FormUrlEncoded - @POST("/pet/{petId}") + @POST("/pet/{petId}") Void updatePetWithForm( @Path("petId") String petId, @Field("name") String name, @Field("status") String status ); @@ -164,15 +163,15 @@ public interface PetApi { * @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet - * @param cb callback method + * @param cb callback method * @return void */ @FormUrlEncoded - @POST("/pet/{petId}") + @POST("/pet/{petId}") void updatePetWithForm( @Path("petId") String petId, @Field("name") String name, @Field("status") String status, Callback cb - ); + ); /** * Deletes a pet @@ -183,7 +182,7 @@ public interface PetApi { * @return Void */ - @DELETE("/pet/{petId}") + @DELETE("/pet/{petId}") Void deletePet( @Path("petId") Long petId, @Header("api_key") String apiKey ); @@ -193,14 +192,14 @@ public interface PetApi { * Async method * @param petId Pet id to delete * @param apiKey - * @param cb callback method + * @param cb callback method * @return void */ - @DELETE("/pet/{petId}") + @DELETE("/pet/{petId}") void deletePet( @Path("petId") Long petId, @Header("api_key") String apiKey, Callback cb - ); + ); /** * uploads an image @@ -213,7 +212,7 @@ public interface PetApi { */ @Multipart - @POST("/pet/{petId}/uploadImage") + @POST("/pet/{petId}/uploadImage") Void uploadFile( @Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file") TypedFile file ); @@ -224,14 +223,14 @@ public interface PetApi { * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload - * @param cb callback method + * @param cb callback method * @return void */ @Multipart - @POST("/pet/{petId}/uploadImage") + @POST("/pet/{petId}/uploadImage") 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 1c0a8291d0..ce9e945685 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 @@ -5,9 +5,7 @@ import io.swagger.client.model.*; import retrofit.Callback; import retrofit.http.*; import retrofit.mime.*; -import java.util.*; -import java.util.Map; import io.swagger.client.model.Order; public interface StoreApi { @@ -16,24 +14,24 @@ public interface StoreApi { * Returns pet inventories by status * Sync method * Returns a map of status codes to quantities - * @return Map + * @return java.util.Map */ - @GET("/store/inventory") - Map getInventory(); + @GET("/store/inventory") + java.util.Map getInventory(); /** * Returns pet inventories by status * Async method - * @param cb callback method + * @param cb callback method * @return void */ - @GET("/store/inventory") + @GET("/store/inventory") void getInventory( - Callback> cb - ); + Callback> cb + ); /** * Place an order for a pet @@ -43,7 +41,7 @@ public interface StoreApi { * @return Order */ - @POST("/store/order") + @POST("/store/order") Order placeOrder( @Body Order body ); @@ -52,14 +50,14 @@ public interface StoreApi { * Place an order for a pet * Async method * @param body order placed for purchasing the pet - * @param cb callback method + * @param cb callback method * @return void */ - @POST("/store/order") + @POST("/store/order") void placeOrder( @Body Order body, Callback cb - ); + ); /** * Find purchase order by ID @@ -69,7 +67,7 @@ public interface StoreApi { * @return Order */ - @GET("/store/order/{orderId}") + @GET("/store/order/{orderId}") Order getOrderById( @Path("orderId") String orderId ); @@ -78,14 +76,14 @@ public interface StoreApi { * Find purchase order by ID * Async method * @param orderId ID of pet that needs to be fetched - * @param cb callback method + * @param cb callback method * @return void */ - @GET("/store/order/{orderId}") + @GET("/store/order/{orderId}") void getOrderById( @Path("orderId") String orderId, Callback cb - ); + ); /** * Delete purchase order by ID @@ -95,7 +93,7 @@ public interface StoreApi { * @return Void */ - @DELETE("/store/order/{orderId}") + @DELETE("/store/order/{orderId}") Void deleteOrder( @Path("orderId") String orderId ); @@ -104,13 +102,13 @@ public interface StoreApi { * Delete purchase order by ID * Async method * @param orderId ID of the order that needs to be deleted - * @param cb callback method + * @param cb callback method * @return void */ - @DELETE("/store/order/{orderId}") + @DELETE("/store/order/{orderId}") void deleteOrder( @Path("orderId") String orderId, 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 162222bc0f..57b8f66f42 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 @@ -5,10 +5,8 @@ import io.swagger.client.model.*; import retrofit.Callback; import retrofit.http.*; import retrofit.mime.*; -import java.util.*; import io.swagger.client.model.User; -import java.util.*; public interface UserApi { @@ -20,7 +18,7 @@ public interface UserApi { * @return Void */ - @POST("/user") + @POST("/user") Void createUser( @Body User body ); @@ -29,14 +27,14 @@ public interface UserApi { * Create user * Async method * @param body Created user object - * @param cb callback method + * @param cb callback method * @return void */ - @POST("/user") + @POST("/user") void createUser( @Body User body, Callback cb - ); + ); /** * Creates list of users with given input array @@ -46,23 +44,23 @@ public interface UserApi { * @return Void */ - @POST("/user/createWithArray") + @POST("/user/createWithArray") Void createUsersWithArrayInput( - @Body List body + @Body java.util.List body ); /** * Creates list of users with given input array * Async method * @param body List of user object - * @param cb callback method + * @param cb callback method * @return void */ - @POST("/user/createWithArray") + @POST("/user/createWithArray") void createUsersWithArrayInput( - @Body List body, Callback cb - ); + @Body java.util.List body, Callback cb + ); /** * Creates list of users with given input array @@ -72,23 +70,23 @@ public interface UserApi { * @return Void */ - @POST("/user/createWithList") + @POST("/user/createWithList") Void createUsersWithListInput( - @Body List body + @Body java.util.List body ); /** * Creates list of users with given input array * Async method * @param body List of user object - * @param cb callback method + * @param cb callback method * @return void */ - @POST("/user/createWithList") + @POST("/user/createWithList") void createUsersWithListInput( - @Body List body, Callback cb - ); + @Body java.util.List body, Callback cb + ); /** * Logs user into the system @@ -99,7 +97,7 @@ public interface UserApi { * @return String */ - @GET("/user/login") + @GET("/user/login") String loginUser( @Query("username") String username, @Query("password") String password ); @@ -109,14 +107,14 @@ public interface UserApi { * Async method * @param username The user name for login * @param password The password for login in clear text - * @param cb callback method + * @param cb callback method * @return void */ - @GET("/user/login") + @GET("/user/login") void loginUser( @Query("username") String username, @Query("password") String password, Callback cb - ); + ); /** * Logs out current logged in user session @@ -125,21 +123,21 @@ public interface UserApi { * @return Void */ - @GET("/user/logout") + @GET("/user/logout") Void logoutUser(); /** * Logs out current logged in user session * Async method - * @param cb callback method + * @param cb callback method * @return void */ - @GET("/user/logout") + @GET("/user/logout") void logoutUser( Callback cb - ); + ); /** * Get user by user name @@ -149,7 +147,7 @@ public interface UserApi { * @return User */ - @GET("/user/{username}") + @GET("/user/{username}") User getUserByName( @Path("username") String username ); @@ -158,14 +156,14 @@ public interface UserApi { * Get user by user name * Async method * @param username The name that needs to be fetched. Use user1 for testing. - * @param cb callback method + * @param cb callback method * @return void */ - @GET("/user/{username}") + @GET("/user/{username}") void getUserByName( @Path("username") String username, Callback cb - ); + ); /** * Updated user @@ -176,7 +174,7 @@ public interface UserApi { * @return Void */ - @PUT("/user/{username}") + @PUT("/user/{username}") Void updateUser( @Path("username") String username, @Body User body ); @@ -186,14 +184,14 @@ public interface UserApi { * Async method * @param username name that need to be deleted * @param body Updated user object - * @param cb callback method + * @param cb callback method * @return void */ - @PUT("/user/{username}") + @PUT("/user/{username}") void updateUser( @Path("username") String username, @Body User body, Callback cb - ); + ); /** * Delete user @@ -203,7 +201,7 @@ public interface UserApi { * @return Void */ - @DELETE("/user/{username}") + @DELETE("/user/{username}") Void deleteUser( @Path("username") String username ); @@ -212,13 +210,13 @@ public interface UserApi { * Delete user * Async method * @param username The name that needs to be deleted - * @param cb callback method + * @param cb callback method * @return void */ - @DELETE("/user/{username}") + @DELETE("/user/{username}") void deleteUser( @Path("username") String username, Callback cb - ); + ); } 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 df8e77b6fb..57c9f791e9 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 @@ -1,7 +1,6 @@ package io.swagger.client.model; import io.swagger.client.StringUtil; -import java.util.Date; import com.google.gson.annotations.SerializedName; @@ -24,7 +23,7 @@ public class Order { private Integer quantity = null; @SerializedName("shipDate") - private Date shipDate = null; + private java.util.Date shipDate = null; public enum StatusEnum { @@ -93,10 +92,10 @@ public enum StatusEnum { /** **/ @ApiModelProperty(value = "") - public Date getShipDate() { + public java.util.Date getShipDate() { return shipDate; } - public void setShipDate(Date shipDate) { + public void setShipDate(java.util.Date shipDate) { this.shipDate = shipDate; } 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 9ab5457e26..4b214d56c0 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 @@ -2,7 +2,6 @@ package io.swagger.client.model; import io.swagger.client.StringUtil; import io.swagger.client.model.Category; -import java.util.*; import io.swagger.client.model.Tag; import com.google.gson.annotations.SerializedName; @@ -26,10 +25,10 @@ public class Pet { private String name = null; @SerializedName("photoUrls") - private List photoUrls = new ArrayList(); + private java.util.List photoUrls = new java.util.ArrayList(); @SerializedName("tags") - private List tags = new ArrayList(); + private java.util.List tags = new java.util.ArrayList(); public enum StatusEnum { @@ -95,10 +94,10 @@ public enum StatusEnum { /** **/ @ApiModelProperty(required = true, value = "") - public List getPhotoUrls() { + public java.util.List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(java.util.List photoUrls) { this.photoUrls = photoUrls; } @@ -106,10 +105,10 @@ public enum StatusEnum { /** **/ @ApiModelProperty(value = "") - public List getTags() { + public java.util.List getTags() { return tags; } - public void setTags(List tags) { + public void setTags(java.util.List tags) { this.tags = tags; }