Add a "fullJavaUtil" option to Java clients

to toggle whether to use full qualified name (with full package prefix)
for classes under java.util
This commit is contained in:
xhh
2015-10-09 22:07:43 +08:00
parent ab34dc5697
commit aa0fbada07
26 changed files with 412 additions and 334 deletions

View File

@@ -1,7 +1,5 @@
package io.swagger.client.api;
import io.swagger.client.model.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
@@ -9,6 +7,8 @@ import retrofit.mime.*;
import io.swagger.client.model.Pet;
import java.io.File;
import java.util.*;
public interface PetApi {
/**
@@ -68,12 +68,12 @@ public interface PetApi {
* Sync method
* Multiple status values can be provided with comma seperated strings
* @param status Status values that need to be considered for filter
* @return java.util.List<Pet>
* @return List<Pet>
*/
@GET("/pet/findByStatus")
java.util.List<Pet> findPetsByStatus(
@Query("status") java.util.List<String> status
List<Pet> findPetsByStatus(
@Query("status") List<String> status
);
/**
@@ -86,7 +86,7 @@ public interface PetApi {
@GET("/pet/findByStatus")
void findPetsByStatus(
@Query("status") java.util.List<String> status, Callback<java.util.List<Pet>> cb
@Query("status") List<String> status, Callback<List<Pet>> cb
);
/**
@@ -94,12 +94,12 @@ public interface PetApi {
* Sync method
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
* @return java.util.List<Pet>
* @return List<Pet>
*/
@GET("/pet/findByTags")
java.util.List<Pet> findPetsByTags(
@Query("tags") java.util.List<String> tags
List<Pet> findPetsByTags(
@Query("tags") List<String> tags
);
/**
@@ -112,7 +112,7 @@ public interface PetApi {
@GET("/pet/findByTags")
void findPetsByTags(
@Query("tags") java.util.List<String> tags, Callback<java.util.List<Pet>> cb
@Query("tags") List<String> tags, Callback<List<Pet>> cb
);
/**

View File

@@ -1,24 +1,25 @@
package io.swagger.client.api;
import io.swagger.client.model.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
import java.util.Map;
import io.swagger.client.model.Order;
import java.util.*;
public interface StoreApi {
/**
* Returns pet inventories by status
* Sync method
* Returns a map of status codes to quantities
* @return java.util.Map<String, Integer>
* @return Map<String, Integer>
*/
@GET("/store/inventory")
java.util.Map<String, Integer> getInventory();
Map<String, Integer> getInventory();
/**
@@ -30,7 +31,7 @@ public interface StoreApi {
@GET("/store/inventory")
void getInventory(
Callback<java.util.Map<String, Integer>> cb
Callback<Map<String, Integer>> cb
);
/**

View File

@@ -1,12 +1,13 @@
package io.swagger.client.api;
import io.swagger.client.model.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
import io.swagger.client.model.User;
import java.util.*;
import java.util.*;
public interface UserApi {
@@ -46,7 +47,7 @@ public interface UserApi {
@POST("/user/createWithArray")
Void createUsersWithArrayInput(
@Body java.util.List<User> body
@Body List<User> body
);
/**
@@ -59,7 +60,7 @@ public interface UserApi {
@POST("/user/createWithArray")
void createUsersWithArrayInput(
@Body java.util.List<User> body, Callback<Void> cb
@Body List<User> body, Callback<Void> cb
);
/**
@@ -72,7 +73,7 @@ public interface UserApi {
@POST("/user/createWithList")
Void createUsersWithListInput(
@Body java.util.List<User> body
@Body List<User> body
);
/**
@@ -85,7 +86,7 @@ public interface UserApi {
@POST("/user/createWithList")
void createUsersWithListInput(
@Body java.util.List<User> body, Callback<Void> cb
@Body List<User> body, Callback<Void> cb
);
/**

View File

@@ -1,6 +1,7 @@
package io.swagger.client.model;
import io.swagger.client.StringUtil;
import java.util.Date;
import com.google.gson.annotations.SerializedName;
@@ -23,7 +24,7 @@ public class Order {
private Integer quantity = null;
@SerializedName("shipDate")
private java.util.Date shipDate = null;
private Date shipDate = null;
public enum StatusEnum {
@@ -92,10 +93,10 @@ public enum StatusEnum {
/**
**/
@ApiModelProperty(value = "")
public java.util.Date getShipDate() {
public Date getShipDate() {
return shipDate;
}
public void setShipDate(java.util.Date shipDate) {
public void setShipDate(Date shipDate) {
this.shipDate = shipDate;
}

View File

@@ -2,6 +2,7 @@ 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;
@@ -25,10 +26,10 @@ public class Pet {
private String name = null;
@SerializedName("photoUrls")
private java.util.List<String> photoUrls = new java.util.ArrayList<String>();
private List<String> photoUrls = new ArrayList<String>();
@SerializedName("tags")
private java.util.List<Tag> tags = new java.util.ArrayList<Tag>();
private List<Tag> tags = new ArrayList<Tag>();
public enum StatusEnum {
@@ -94,10 +95,10 @@ public enum StatusEnum {
/**
**/
@ApiModelProperty(required = true, value = "")
public java.util.List<String> getPhotoUrls() {
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(java.util.List<String> photoUrls) {
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
@@ -105,10 +106,10 @@ public enum StatusEnum {
/**
**/
@ApiModelProperty(value = "")
public java.util.List<Tag> getTags() {
public List<Tag> getTags() {
return tags;
}
public void setTags(java.util.List<Tag> tags) {
public void setTags(List<Tag> tags) {
this.tags = tags;
}