forked from loafle/openapi-generator-original
fix java default and feign sample
This commit is contained in:
@@ -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-04-23T12:48:24.088+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class FormAwareEncoder implements Encoder {
|
||||
public static final String UTF_8 = "utf-8";
|
||||
private static final String LINE_FEED = "\r\n";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:48:24.088+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
|
||||
@@ -3,8 +3,8 @@ package io.swagger.client.api;
|
||||
import io.swagger.client.ApiClient;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import io.swagger.client.model.InlineResponse200;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -12,14 +12,14 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import feign.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public interface PetApi extends ApiClient.Api {
|
||||
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (optional)
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /pet")
|
||||
@@ -28,20 +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
|
||||
*
|
||||
* @param body Pet object in the form of byte array (optional)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /pet?testing_byte_array=true")
|
||||
@Headers({
|
||||
"Content-type: application/json",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void addPetUsingByteArray(byte[] body);
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
@@ -56,11 +43,11 @@ 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
|
||||
* @param status Status values that need to be considered for query (optional, default to available)
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @return List<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByStatus?status={status}")
|
||||
@@ -69,11 +56,11 @@ public interface PetApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
List<Pet> findPetsByStatus(@Param("status") List<String> status);
|
||||
|
||||
|
||||
/**
|
||||
* 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 (optional)
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return List<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@@ -82,11 +69,11 @@ public interface PetApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
List<Pet> findPetsByTags(@Param("tags") List<String> tags);
|
||||
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
* @param petId ID of pet that needs to be fetched (required)
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @return Pet
|
||||
*/
|
||||
@RequestLine("GET /pet/{petId}")
|
||||
@@ -95,37 +82,11 @@ 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
|
||||
* @param petId ID of pet that needs to be fetched (required)
|
||||
* @return InlineResponse200
|
||||
*/
|
||||
@RequestLine("GET /pet/{petId}?response=inline_arbitrary_object")
|
||||
@Headers({
|
||||
"Content-type: application/json",
|
||||
"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
|
||||
* @param petId ID of pet that needs to be fetched (required)
|
||||
* @return byte[]
|
||||
*/
|
||||
@RequestLine("GET /pet/{petId}?testing_byte_array=true")
|
||||
@Headers({
|
||||
"Content-type: application/json",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
byte[] petPetIdtestingByteArraytrueGet(@Param("petId") Long petId);
|
||||
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (optional)
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("PUT /pet")
|
||||
@@ -134,7 +95,7 @@ public interface PetApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void updatePet(Pet body);
|
||||
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
@@ -148,21 +109,20 @@ public interface PetApi extends ApiClient.Api {
|
||||
"Content-type: application/x-www-form-urlencoded",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void updatePetWithForm(@Param("petId") String petId, @Param("name") String name, @Param("status") String status);
|
||||
|
||||
void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @return void
|
||||
* @return ModelApiResponse
|
||||
*/
|
||||
@RequestLine("POST /pet/{petId}/uploadImage")
|
||||
@Headers({
|
||||
"Content-type: multipart/form-data",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
|
||||
|
||||
ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import feign.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public interface StoreApi extends ApiClient.Api {
|
||||
|
||||
|
||||
@@ -26,20 +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
|
||||
* @param status Status value that needs to be considered for query (optional, default to placed)
|
||||
* @return List<Order>
|
||||
*/
|
||||
@RequestLine("GET /store/findByStatus?status={status}")
|
||||
@Headers({
|
||||
"Content-type: application/json",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
List<Order> findOrdersByStatus(@Param("status") String status);
|
||||
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
@@ -51,22 +38,10 @@ public interface StoreApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
Map<String, Integer> 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 Object
|
||||
*/
|
||||
@RequestLine("GET /store/inventory?response=arbitrary_object")
|
||||
@Headers({
|
||||
"Content-type: application/json",
|
||||
"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
|
||||
*/
|
||||
@@ -75,12 +50,12 @@ public interface StoreApi extends ApiClient.Api {
|
||||
"Content-type: application/json",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
Order getOrderById(@Param("orderId") String orderId);
|
||||
|
||||
Order getOrderById(@Param("orderId") Long orderId);
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (optional)
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @return Order
|
||||
*/
|
||||
@RequestLine("POST /store/order")
|
||||
@@ -89,5 +64,4 @@ public interface StoreApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
Order placeOrder(Order body);
|
||||
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import feign.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public interface UserApi extends ApiClient.Api {
|
||||
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (optional)
|
||||
* @param body Created user object (required)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /user")
|
||||
@@ -26,11 +26,11 @@ public interface UserApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void createUser(User body);
|
||||
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (optional)
|
||||
* @param body List of user object (required)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /user/createWithArray")
|
||||
@@ -39,11 +39,11 @@ public interface UserApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void createUsersWithArrayInput(List<User> body);
|
||||
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (optional)
|
||||
* @param body List of user object (required)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /user/createWithList")
|
||||
@@ -52,7 +52,7 @@ public interface UserApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void createUsersWithListInput(List<User> body);
|
||||
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
@@ -65,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}")
|
||||
@@ -78,12 +78,12 @@ public interface UserApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
User getUserByName(@Param("username") String username);
|
||||
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (optional)
|
||||
* @param password The password for login in clear text (optional)
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /user/login?username={username}&password={password}")
|
||||
@@ -92,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
|
||||
*
|
||||
@@ -104,12 +104,12 @@ public interface UserApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void logoutUser();
|
||||
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (optional)
|
||||
* @param body Updated user object (required)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("PUT /user/{username}")
|
||||
@@ -118,5 +118,4 @@ public interface UserApi extends ApiClient.Api {
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void updateUser(@Param("username") String username, User body);
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* Animal
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class Animal {
|
||||
|
||||
private String className = null;
|
||||
@@ -31,7 +31,6 @@ public class Animal {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
|
||||
/**
|
||||
* Cat
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class Cat extends Animal {
|
||||
|
||||
private String className = null;
|
||||
@@ -33,7 +33,7 @@ public class Cat extends Animal {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Cat declawed(Boolean declawed) {
|
||||
@@ -50,7 +50,6 @@ public class Cat extends Animal {
|
||||
this.declawed = declawed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* Category
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08: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) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
|
||||
/**
|
||||
* Dog
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class Dog extends Animal {
|
||||
|
||||
private String className = null;
|
||||
@@ -33,7 +33,7 @@ public class Dog extends Animal {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Dog breed(String breed) {
|
||||
@@ -50,7 +50,6 @@ public class Dog extends Animal {
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* EnumTest
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class EnumTest {
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public class EnumTest {
|
||||
this.enumString = enumString;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
|
||||
@@ -114,7 +114,7 @@ public class EnumTest {
|
||||
this.enumInteger = enumInteger;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
|
||||
@@ -131,7 +131,6 @@ public class EnumTest {
|
||||
this.enumNumber = enumNumber;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -8,10 +8,10 @@ import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:48:24.088+08:00")
|
||||
/**
|
||||
* FormatTest
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class FormatTest {
|
||||
|
||||
private Integer integer = null;
|
||||
@@ -29,6 +29,8 @@ public class FormatTest {
|
||||
|
||||
|
||||
/**
|
||||
* minimum: 10.0
|
||||
* maximum: 100.0
|
||||
**/
|
||||
public FormatTest integer(Integer integer) {
|
||||
this.integer = integer;
|
||||
@@ -46,6 +48,8 @@ public class FormatTest {
|
||||
|
||||
|
||||
/**
|
||||
* minimum: 20.0
|
||||
* maximum: 200.0
|
||||
**/
|
||||
public FormatTest int32(Integer int32) {
|
||||
this.int32 = int32;
|
||||
@@ -80,6 +84,8 @@ public class FormatTest {
|
||||
|
||||
|
||||
/**
|
||||
* minimum: 32.1
|
||||
* maximum: 543.2
|
||||
**/
|
||||
public FormatTest number(BigDecimal number) {
|
||||
this.number = number;
|
||||
@@ -97,6 +103,8 @@ public class FormatTest {
|
||||
|
||||
|
||||
/**
|
||||
* minimum: 54.3
|
||||
* maximum: 987.6
|
||||
**/
|
||||
public FormatTest _float(Float _float) {
|
||||
this._float = _float;
|
||||
@@ -114,6 +122,8 @@ public class FormatTest {
|
||||
|
||||
|
||||
/**
|
||||
* minimum: 67.8
|
||||
* maximum: 123.4
|
||||
**/
|
||||
public FormatTest _double(Double _double) {
|
||||
this._double = _double;
|
||||
@@ -154,7 +164,7 @@ public class FormatTest {
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("byte")
|
||||
public byte[] getByte() {
|
||||
return _byte;
|
||||
@@ -188,7 +198,7 @@ public class FormatTest {
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("date")
|
||||
public Date getDate() {
|
||||
return date;
|
||||
@@ -222,7 +232,7 @@ public class FormatTest {
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("password")
|
||||
public String getPassword() {
|
||||
return password;
|
||||
|
||||
@@ -7,9 +7,10 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Model200Response
|
||||
* Model for testing model name starting with number
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+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-27T23:17:22.230+08:00")
|
||||
public class Model200Response {
|
||||
|
||||
private Integer name = null;
|
||||
@@ -31,7 +32,6 @@ public class Model200Response {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -6,10 +6,10 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:48:24.088+08:00")
|
||||
/**
|
||||
* ModelApiResponse
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class ModelApiResponse {
|
||||
|
||||
private Integer code = null;
|
||||
|
||||
@@ -7,9 +7,10 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* ModelReturn
|
||||
* Model for testing reserved words
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class ModelReturn {
|
||||
|
||||
private Integer _return = null;
|
||||
@@ -31,7 +32,6 @@ public class ModelReturn {
|
||||
this._return = _return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -7,13 +7,15 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Name
|
||||
* Model for testing model name same as property name
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+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-27T23:17:22.230+08:00")
|
||||
public class Name {
|
||||
|
||||
private Integer name = null;
|
||||
private Integer snakeCase = null;
|
||||
private String property = null;
|
||||
|
||||
|
||||
/**
|
||||
@@ -23,7 +25,7 @@ public class Name {
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
@JsonProperty("name")
|
||||
public Integer getName() {
|
||||
return name;
|
||||
@@ -32,24 +34,30 @@ 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;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Name property(String property) {
|
||||
this.property = property;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("property")
|
||||
public String getProperty() {
|
||||
return property;
|
||||
}
|
||||
public void setProperty(String property) {
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -61,12 +69,13 @@ public class Name {
|
||||
}
|
||||
Name name = (Name) o;
|
||||
return Objects.equals(this.name, name.name) &&
|
||||
Objects.equals(this.snakeCase, name.snakeCase);
|
||||
Objects.equals(this.snakeCase, name.snakeCase) &&
|
||||
Objects.equals(this.property, name.property);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, snakeCase);
|
||||
return Objects.hash(name, snakeCase, property);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,6 +85,7 @@ public class Name {
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
|
||||
sb.append(" property: ").append(toIndentedString(property)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.Date;
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class Order {
|
||||
|
||||
private Long id = null;
|
||||
@@ -40,17 +40,27 @@ public class Order {
|
||||
}
|
||||
}
|
||||
|
||||
private StatusEnum status = StatusEnum.PLACED;
|
||||
private Boolean complete = null;
|
||||
private StatusEnum status = null;
|
||||
private Boolean complete = false;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order petId(Long petId) {
|
||||
@@ -67,7 +77,7 @@ public class Order {
|
||||
this.petId = petId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order quantity(Integer quantity) {
|
||||
@@ -84,7 +94,7 @@ public class Order {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order shipDate(Date shipDate) {
|
||||
@@ -101,7 +111,7 @@ public class Order {
|
||||
this.shipDate = shipDate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
@@ -119,7 +129,7 @@ public class Order {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order complete(Boolean complete) {
|
||||
@@ -136,7 +146,6 @@ public class Order {
|
||||
this.complete = complete;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* Pet
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class Pet {
|
||||
|
||||
private Long id = null;
|
||||
@@ -63,7 +63,7 @@ public class Pet {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet category(Category category) {
|
||||
@@ -80,7 +80,7 @@ public class Pet {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet name(String name) {
|
||||
@@ -97,7 +97,7 @@ public class Pet {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet photoUrls(List<String> photoUrls) {
|
||||
@@ -114,7 +114,7 @@ public class Pet {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet tags(List<Tag> tags) {
|
||||
@@ -131,7 +131,7 @@ public class Pet {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
@@ -149,7 +149,6 @@ public class Pet {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* SpecialModelName
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
|
||||
public class SpecialModelName {
|
||||
|
||||
private Long specialPropertyName = null;
|
||||
@@ -31,7 +31,6 @@ public class SpecialModelName {
|
||||
this.specialPropertyName = specialPropertyName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* Tag
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08: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) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08: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) {
|
||||
|
||||
Reference in New Issue
Block a user