forked from loafle/openapi-generator-original
Revert "[Java] Add auto-generated documentation in Markdown to Java clients"
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-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class FormAwareEncoder implements Encoder {
|
||||
public static final String UTF_8 = "utf-8";
|
||||
private static final String LINE_FEED = "\r\n";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
|
||||
@@ -3,7 +3,7 @@ package io.swagger.client.api;
|
||||
import io.swagger.client.ApiClient;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import io.swagger.client.model.InlineResponse200;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -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-21T18:26:32.462+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public interface PetApi extends ApiClient.Api {
|
||||
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param body Pet object that needs to be added to the store (optional)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /pet")
|
||||
@@ -29,6 +29,19 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
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
|
||||
*
|
||||
@@ -47,7 +60,7 @@ public interface PetApi extends ApiClient.Api {
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @param status Status values that need to be considered for query (optional, default to available)
|
||||
* @return List<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByStatus?status={status}")
|
||||
@@ -59,8 +72,8 @@ public interface PetApi extends ApiClient.Api {
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (optional)
|
||||
* @return List<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@@ -72,8 +85,8 @@ public interface PetApi extends ApiClient.Api {
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* 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 Pet
|
||||
*/
|
||||
@RequestLine("GET /pet/{petId}")
|
||||
@@ -83,10 +96,36 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
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 (required)
|
||||
* @param body Pet object that needs to be added to the store (optional)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("PUT /pet")
|
||||
@@ -109,7 +148,7 @@ public interface PetApi extends ApiClient.Api {
|
||||
"Content-type: application/x-www-form-urlencoded",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
|
||||
void updatePetWithForm(@Param("petId") String petId, @Param("name") String name, @Param("status") String status);
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
@@ -117,12 +156,12 @@ public interface PetApi extends ApiClient.Api {
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @return ModelApiResponse
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /pet/{petId}/uploadImage")
|
||||
@Headers({
|
||||
"Content-type: multipart/form-data",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
|
||||
void 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-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public interface StoreApi extends ApiClient.Api {
|
||||
|
||||
|
||||
@@ -27,6 +27,19 @@ public interface StoreApi extends ApiClient.Api {
|
||||
})
|
||||
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
|
||||
@@ -39,6 +52,18 @@ public interface StoreApi extends ApiClient.Api {
|
||||
})
|
||||
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
|
||||
@@ -50,12 +75,12 @@ public interface StoreApi extends ApiClient.Api {
|
||||
"Content-type: application/json",
|
||||
"Accepts: application/json",
|
||||
})
|
||||
Order getOrderById(@Param("orderId") Long orderId);
|
||||
Order getOrderById(@Param("orderId") String orderId);
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param body order placed for purchasing the pet (optional)
|
||||
* @return Order
|
||||
*/
|
||||
@RequestLine("POST /store/order")
|
||||
|
||||
@@ -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-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public interface UserApi extends ApiClient.Api {
|
||||
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @param body Created user object (optional)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /user")
|
||||
@@ -30,7 +30,7 @@ public interface UserApi extends ApiClient.Api {
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param body List of user object (optional)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /user/createWithArray")
|
||||
@@ -43,7 +43,7 @@ public interface UserApi extends ApiClient.Api {
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param body List of user object (optional)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("POST /user/createWithList")
|
||||
@@ -82,8 +82,8 @@ public interface UserApi extends ApiClient.Api {
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @param username The user name for login (optional)
|
||||
* @param password The password for login in clear text (optional)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /user/login?username={username}&password={password}")
|
||||
@@ -109,7 +109,7 @@ public interface UserApi extends ApiClient.Api {
|
||||
* 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 (required)
|
||||
* @param body Updated user object (optional)
|
||||
* @return void
|
||||
*/
|
||||
@RequestLine("PUT /user/{username}")
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Animal {
|
||||
|
||||
private String className = null;
|
||||
|
||||
@@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Cat extends Animal {
|
||||
|
||||
private String className = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Category {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Dog extends Animal {
|
||||
|
||||
private String className = null;
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.Date;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class FormatTest {
|
||||
|
||||
private Integer integer = null;
|
||||
|
||||
@@ -12,7 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
**/
|
||||
|
||||
@ApiModel(description = "Model for testing model name starting with number")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Model200Response {
|
||||
|
||||
private Integer name = null;
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-21T18:26:32.462+08:00")
|
||||
public class ModelApiResponse {
|
||||
|
||||
private Integer code = null;
|
||||
private String type = null;
|
||||
private String message = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelApiResponse code(Integer code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("code")
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelApiResponse type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("type")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelApiResponse message(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@JsonProperty("message")
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||
return Objects.equals(this.code, _apiResponse.code) &&
|
||||
Objects.equals(this.type, _apiResponse.type) &&
|
||||
Objects.equals(this.message, _apiResponse.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(code, type, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ModelApiResponse {\n");
|
||||
|
||||
sb.append(" code: ").append(toIndentedString(code)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
**/
|
||||
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class ModelReturn {
|
||||
|
||||
private Integer _return = null;
|
||||
|
||||
@@ -12,7 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
**/
|
||||
|
||||
@ApiModel(description = "Model for testing model name same as property name")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Name {
|
||||
|
||||
private Integer name = null;
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.Date;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Order {
|
||||
|
||||
private Long id = null;
|
||||
@@ -39,24 +39,14 @@ public class Order {
|
||||
}
|
||||
|
||||
private StatusEnum status = null;
|
||||
private Boolean complete = false;
|
||||
private Boolean complete = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Pet {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class SpecialModelName {
|
||||
|
||||
private Long specialPropertyName = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class Tag {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
|
||||
public class User {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -120,7 +120,7 @@ public class PetApiTest {
|
||||
|
||||
Pet fetched = api.getPetById(pet.getId());
|
||||
|
||||
api.updatePetWithForm(fetched.getId(), "furt", null);
|
||||
api.updatePetWithForm(fetched.getId().toString(), "furt", null);
|
||||
Pet updated = api.getPetById(fetched.getId());
|
||||
|
||||
assertEquals(updated.getName(), "furt");
|
||||
|
||||
@@ -35,7 +35,7 @@ public class StoreApiTest {
|
||||
Order order = createOrder();
|
||||
api.placeOrder(order);
|
||||
|
||||
Order fetched = api.getOrderById(order.getId());
|
||||
Order fetched = api.getOrderById(order.getId().toString());
|
||||
assertEquals(order.getId(), fetched.getId());
|
||||
assertEquals(order.getPetId(), fetched.getPetId());
|
||||
assertEquals(order.getQuantity(), fetched.getQuantity());
|
||||
@@ -46,13 +46,13 @@ public class StoreApiTest {
|
||||
Order order = createOrder();
|
||||
api.placeOrder(order);
|
||||
|
||||
Order fetched = api.getOrderById(order.getId());
|
||||
Order fetched = api.getOrderById(order.getId().toString());
|
||||
assertEquals(fetched.getId(), order.getId());
|
||||
|
||||
api.deleteOrder(order.getId().toString());
|
||||
|
||||
try {
|
||||
api.getOrderById(order.getId());
|
||||
api.getOrderById(order.getId().toString());
|
||||
fail("expected an error");
|
||||
} catch (FeignException e) {
|
||||
assertTrue(e.getMessage().startsWith("status 404 "));
|
||||
|
||||
Reference in New Issue
Block a user