forked from loafle/openapi-generator-original
Update samples for JaxRS/CXF. (#5201)
This commit is contained in:
parent
e50e653e3d
commit
9b25c0f529
@ -19,6 +19,7 @@ import io.swagger.annotations.ApiResponses;
|
|||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -31,7 +32,7 @@ public interface PetApi {
|
|||||||
@ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
|
@ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input") })
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
public void addPet(Pet body);
|
public void addPet(@Valid Pet body);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/pet/{petId}")
|
@Path("/pet/{petId}")
|
||||||
@ -78,7 +79,7 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
@ApiResponse(code = 404, message = "Pet not found"),
|
@ApiResponse(code = 404, message = "Pet not found"),
|
||||||
@ApiResponse(code = 405, message = "Validation exception") })
|
@ApiResponse(code = 405, message = "Validation exception") })
|
||||||
public void updatePet(Pet body);
|
public void updatePet(@Valid Pet body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/pet/{petId}")
|
@Path("/pet/{petId}")
|
||||||
|
@ -18,6 +18,7 @@ import io.swagger.annotations.ApiResponses;
|
|||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -57,6 +58,6 @@ public interface StoreApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid Order") })
|
@ApiResponse(code = 400, message = "Invalid Order") })
|
||||||
public Order placeOrder(Order body);
|
public Order placeOrder(@Valid Order body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ import io.swagger.annotations.ApiResponses;
|
|||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -29,7 +30,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Create user", tags={ "user", })
|
@ApiOperation(value = "Create user", tags={ "user", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUser(User body);
|
public void createUser(@Valid User body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/user/createWithArray")
|
@Path("/user/createWithArray")
|
||||||
@ -37,7 +38,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUsersWithArrayInput(List<User> body);
|
public void createUsersWithArrayInput(@Valid List<User> body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/user/createWithList")
|
@Path("/user/createWithList")
|
||||||
@ -45,7 +46,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUsersWithListInput(List<User> body);
|
public void createUsersWithListInput(@Valid List<User> body);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/user/{username}")
|
@Path("/user/{username}")
|
||||||
@ -90,6 +91,6 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||||
@ApiResponse(code = 404, message = "User not found") })
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
public void updateUser(@PathParam("username") String username, User body);
|
public void updateUser(@PathParam("username") String username, @Valid User body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,8 +15,11 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
|||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/v2")
|
@Path("/v2")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -27,30 +30,44 @@ public interface PetApi {
|
|||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
|
@ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
|
||||||
public void addPet(Pet body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
|
public void addPet(@Valid Pet body);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/pet/{petId}")
|
@Path("/pet/{petId}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Deletes a pet", tags={ "pet", })
|
@ApiOperation(value = "Deletes a pet", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid pet value") })
|
||||||
public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
|
public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/pet/findByStatus")
|
@Path("/pet/findByStatus")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Finds Pets by status", tags={ "pet", })
|
@ApiOperation(value = "Finds Pets by status", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid status value") })
|
||||||
public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status);
|
public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/pet/findByTags")
|
@Path("/pet/findByTags")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
|
@ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid tag value") })
|
||||||
public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags);
|
public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/pet/{petId}")
|
@Path("/pet/{petId}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Find pet by ID", tags={ "pet", })
|
@ApiOperation(value = "Find pet by ID", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "Pet not found") })
|
||||||
public Pet getPetById(@PathParam("petId") Long petId);
|
public Pet getPetById(@PathParam("petId") Long petId);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@ -58,13 +75,19 @@ public interface PetApi {
|
|||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Update an existing pet", tags={ "pet", })
|
@ApiOperation(value = "Update an existing pet", tags={ "pet", })
|
||||||
public void updatePet(Pet body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "Pet not found"),
|
||||||
|
@ApiResponse(code = 405, message = "Validation exception") })
|
||||||
|
public void updatePet(@Valid Pet body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/pet/{petId}")
|
@Path("/pet/{petId}")
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", })
|
@ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
|
public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@ -72,6 +95,8 @@ public interface PetApi {
|
|||||||
@Consumes({ "multipart/form-data" })
|
@Consumes({ "multipart/form-data" })
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json" })
|
||||||
@ApiOperation(value = "uploads an image", tags={ "pet" })
|
@ApiOperation(value = "uploads an image", tags={ "pet" })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail);
|
public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,8 +14,11 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
|||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/v2")
|
@Path("/v2")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -25,24 +28,36 @@ public interface StoreApi {
|
|||||||
@Path("/store/order/{orderId}")
|
@Path("/store/order/{orderId}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
|
@ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "Order not found") })
|
||||||
public void deleteOrder(@PathParam("orderId") String orderId);
|
public void deleteOrder(@PathParam("orderId") String orderId);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/store/inventory")
|
@Path("/store/inventory")
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json" })
|
||||||
@ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
|
@ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
|
||||||
public Map<String, Integer> getInventory();
|
public Map<String, Integer> getInventory();
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/store/order/{orderId}")
|
@Path("/store/order/{orderId}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Find purchase order by ID", tags={ "store", })
|
@ApiOperation(value = "Find purchase order by ID", tags={ "store", })
|
||||||
public Order getOrderById(@PathParam("orderId") Long orderId);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "Order not found") })
|
||||||
|
public Order getOrderById(@PathParam("orderId") @Min(1) @Max(5) Long orderId);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/store/order")
|
@Path("/store/order")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Place an order for a pet", tags={ "store" })
|
@ApiOperation(value = "Place an order for a pet", tags={ "store" })
|
||||||
public Order placeOrder(Order body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid Order") })
|
||||||
|
public Order placeOrder(@Valid Order body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,8 +14,11 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
|||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/v2")
|
@Path("/v2")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -25,48 +28,69 @@ public interface UserApi {
|
|||||||
@Path("/user")
|
@Path("/user")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Create user", tags={ "user", })
|
@ApiOperation(value = "Create user", tags={ "user", })
|
||||||
public void createUser(User body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
|
public void createUser(@Valid User body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/user/createWithArray")
|
@Path("/user/createWithArray")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
||||||
public void createUsersWithArrayInput(List<User> body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
|
public void createUsersWithArrayInput(@Valid List<User> body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/user/createWithList")
|
@Path("/user/createWithList")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
||||||
public void createUsersWithListInput(List<User> body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
|
public void createUsersWithListInput(@Valid List<User> body);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/user/{username}")
|
@Path("/user/{username}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Delete user", tags={ "user", })
|
@ApiOperation(value = "Delete user", tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
public void deleteUser(@PathParam("username") String username);
|
public void deleteUser(@PathParam("username") String username);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/user/{username}")
|
@Path("/user/{username}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Get user by user name", tags={ "user", })
|
@ApiOperation(value = "Get user by user name", tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
public User getUserByName(@PathParam("username") String username);
|
public User getUserByName(@PathParam("username") String username);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/user/login")
|
@Path("/user/login")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Logs user into the system", tags={ "user", })
|
@ApiOperation(value = "Logs user into the system", tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = String.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
|
||||||
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
|
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/user/logout")
|
@Path("/user/logout")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
|
@ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void logoutUser();
|
public void logoutUser();
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/user/{username}")
|
@Path("/user/{username}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Updated user", tags={ "user" })
|
@ApiOperation(value = "Updated user", tags={ "user" })
|
||||||
public void updateUser(@PathParam("username") String username, User body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
|
public void updateUser(@PathParam("username") String username, @Valid User body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="A category for a pet")
|
@ApiModel(description="A category for a pet")
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,11 +15,11 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="Describes the result of uploading an image resource")
|
@ApiModel(description="Describes the result of uploading an image resource")
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String type = null;
|
private String type = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String message = null;
|
private String message = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.swagger.model;
|
package io.swagger.model;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import java.util.Date;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -15,14 +16,14 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="An order for a pets from the pet store")
|
@ApiModel(description="An order for a pets from the pet store")
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long petId = null;
|
private Long petId = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Integer quantity = null;
|
private Integer quantity = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private javax.xml.datatype.XMLGregorianCalendar shipDate = null;
|
private Date shipDate = null;
|
||||||
|
|
||||||
@XmlType(name="StatusEnum")
|
@XmlType(name="StatusEnum")
|
||||||
@XmlEnum(String.class)
|
@XmlEnum(String.class)
|
||||||
@ -56,9 +57,9 @@ public enum StatusEnum {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "Order Status")
|
@ApiModelProperty(value = "Order Status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Boolean complete = false;
|
private Boolean complete = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -116,15 +117,15 @@ public enum StatusEnum {
|
|||||||
* Get shipDate
|
* Get shipDate
|
||||||
* @return shipDate
|
* @return shipDate
|
||||||
**/
|
**/
|
||||||
public javax.xml.datatype.XMLGregorianCalendar getShipDate() {
|
public Date getShipDate() {
|
||||||
return shipDate;
|
return shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
|
public void setShipDate(Date shipDate) {
|
||||||
this.shipDate = shipDate;
|
this.shipDate = shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Order shipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
|
public Order shipDate(Date shipDate) {
|
||||||
this.shipDate = shipDate;
|
this.shipDate = shipDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -19,15 +19,15 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="A pet for sale in the pet store")
|
@ApiModel(description="A pet for sale in the pet store")
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Category category = null;
|
private Category category = null;
|
||||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
@ApiModelProperty(example = "null", required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
private List<String> photoUrls = new ArrayList<String>();
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private List<Tag> tags = new ArrayList<Tag>();
|
private List<Tag> tags = new ArrayList<Tag>();
|
||||||
|
|
||||||
@XmlType(name="StatusEnum")
|
@XmlType(name="StatusEnum")
|
||||||
@ -62,7 +62,7 @@ public enum StatusEnum {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "pet status in the store")
|
@ApiModelProperty(value = "pet status in the store")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="A tag for a pet")
|
@ApiModel(description="A tag for a pet")
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,21 +15,21 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="A User who is purchasing from the pet store")
|
@ApiModel(description="A User who is purchasing from the pet store")
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String username = null;
|
private String username = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String firstName = null;
|
private String firstName = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String lastName = null;
|
private String lastName = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String email = null;
|
private String email = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String password = null;
|
private String password = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String phone = null;
|
private String phone = null;
|
||||||
@ApiModelProperty(example = "null", value = "User Status")
|
@ApiModelProperty(value = "User Status")
|
||||||
private Integer userStatus = null;
|
private Integer userStatus = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,8 +15,11 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
|||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -27,30 +30,44 @@ public interface PetApi {
|
|||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
|
@ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
|
||||||
public void addPet(Pet body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
|
public void addPet(@Valid Pet body);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/pet/{petId}")
|
@Path("/pet/{petId}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Deletes a pet", tags={ "pet", })
|
@ApiOperation(value = "Deletes a pet", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid pet value") })
|
||||||
public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
|
public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/pet/findByStatus")
|
@Path("/pet/findByStatus")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Finds Pets by status", tags={ "pet", })
|
@ApiOperation(value = "Finds Pets by status", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid status value") })
|
||||||
public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status);
|
public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/pet/findByTags")
|
@Path("/pet/findByTags")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
|
@ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid tag value") })
|
||||||
public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags);
|
public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/pet/{petId}")
|
@Path("/pet/{petId}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Find pet by ID", tags={ "pet", })
|
@ApiOperation(value = "Find pet by ID", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "Pet not found") })
|
||||||
public Pet getPetById(@PathParam("petId") Long petId);
|
public Pet getPetById(@PathParam("petId") Long petId);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@ -58,13 +75,19 @@ public interface PetApi {
|
|||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Update an existing pet", tags={ "pet", })
|
@ApiOperation(value = "Update an existing pet", tags={ "pet", })
|
||||||
public void updatePet(Pet body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "Pet not found"),
|
||||||
|
@ApiResponse(code = 405, message = "Validation exception") })
|
||||||
|
public void updatePet(@Valid Pet body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/pet/{petId}")
|
@Path("/pet/{petId}")
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", })
|
@ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
|
public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@ -72,6 +95,8 @@ public interface PetApi {
|
|||||||
@Consumes({ "multipart/form-data" })
|
@Consumes({ "multipart/form-data" })
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json" })
|
||||||
@ApiOperation(value = "uploads an image", tags={ "pet" })
|
@ApiOperation(value = "uploads an image", tags={ "pet" })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail);
|
public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,8 +14,11 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
|||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -25,24 +28,36 @@ public interface StoreApi {
|
|||||||
@Path("/store/order/{orderId}")
|
@Path("/store/order/{orderId}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
|
@ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "Order not found") })
|
||||||
public void deleteOrder(@PathParam("orderId") String orderId);
|
public void deleteOrder(@PathParam("orderId") String orderId);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/store/inventory")
|
@Path("/store/inventory")
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json" })
|
||||||
@ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
|
@ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
|
||||||
public Map<String, Integer> getInventory();
|
public Map<String, Integer> getInventory();
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/store/order/{orderId}")
|
@Path("/store/order/{orderId}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Find purchase order by ID", tags={ "store", })
|
@ApiOperation(value = "Find purchase order by ID", tags={ "store", })
|
||||||
public Order getOrderById(@PathParam("orderId") Long orderId);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "Order not found") })
|
||||||
|
public Order getOrderById(@PathParam("orderId") @Min(1) @Max(5) Long orderId);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/store/order")
|
@Path("/store/order")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Place an order for a pet", tags={ "store" })
|
@ApiOperation(value = "Place an order for a pet", tags={ "store" })
|
||||||
public Order placeOrder(Order body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid Order") })
|
||||||
|
public Order placeOrder(@Valid Order body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,8 +14,11 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
|||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
import io.swagger.jaxrs.PATCH;
|
import io.swagger.jaxrs.PATCH;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Api(value = "/", description = "")
|
@Api(value = "/", description = "")
|
||||||
@ -25,48 +28,69 @@ public interface UserApi {
|
|||||||
@Path("/user")
|
@Path("/user")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Create user", tags={ "user", })
|
@ApiOperation(value = "Create user", tags={ "user", })
|
||||||
public void createUser(User body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
|
public void createUser(@Valid User body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/user/createWithArray")
|
@Path("/user/createWithArray")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
||||||
public void createUsersWithArrayInput(List<User> body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
|
public void createUsersWithArrayInput(@Valid List<User> body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/user/createWithList")
|
@Path("/user/createWithList")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
|
||||||
public void createUsersWithListInput(List<User> body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
|
public void createUsersWithListInput(@Valid List<User> body);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/user/{username}")
|
@Path("/user/{username}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Delete user", tags={ "user", })
|
@ApiOperation(value = "Delete user", tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
public void deleteUser(@PathParam("username") String username);
|
public void deleteUser(@PathParam("username") String username);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/user/{username}")
|
@Path("/user/{username}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Get user by user name", tags={ "user", })
|
@ApiOperation(value = "Get user by user name", tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
public User getUserByName(@PathParam("username") String username);
|
public User getUserByName(@PathParam("username") String username);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/user/login")
|
@Path("/user/login")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Logs user into the system", tags={ "user", })
|
@ApiOperation(value = "Logs user into the system", tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = String.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
|
||||||
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
|
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/user/logout")
|
@Path("/user/logout")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
|
@ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void logoutUser();
|
public void logoutUser();
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/user/{username}")
|
@Path("/user/{username}")
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@ApiOperation(value = "Updated user", tags={ "user" })
|
@ApiOperation(value = "Updated user", tags={ "user" })
|
||||||
public void updateUser(@PathParam("username") String username, User body);
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||||
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
|
public void updateUser(@PathParam("username") String username, @Valid User body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="A category for a pet")
|
@ApiModel(description="A category for a pet")
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,11 +15,11 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="Describes the result of uploading an image resource")
|
@ApiModel(description="Describes the result of uploading an image resource")
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String type = null;
|
private String type = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String message = null;
|
private String message = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.swagger.model;
|
package io.swagger.model;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import java.util.Date;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -15,14 +16,14 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="An order for a pets from the pet store")
|
@ApiModel(description="An order for a pets from the pet store")
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long petId = null;
|
private Long petId = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Integer quantity = null;
|
private Integer quantity = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private javax.xml.datatype.XMLGregorianCalendar shipDate = null;
|
private Date shipDate = null;
|
||||||
|
|
||||||
@XmlType(name="StatusEnum")
|
@XmlType(name="StatusEnum")
|
||||||
@XmlEnum(String.class)
|
@XmlEnum(String.class)
|
||||||
@ -56,9 +57,9 @@ public enum StatusEnum {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "Order Status")
|
@ApiModelProperty(value = "Order Status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Boolean complete = false;
|
private Boolean complete = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -116,15 +117,15 @@ public enum StatusEnum {
|
|||||||
* Get shipDate
|
* Get shipDate
|
||||||
* @return shipDate
|
* @return shipDate
|
||||||
**/
|
**/
|
||||||
public javax.xml.datatype.XMLGregorianCalendar getShipDate() {
|
public Date getShipDate() {
|
||||||
return shipDate;
|
return shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
|
public void setShipDate(Date shipDate) {
|
||||||
this.shipDate = shipDate;
|
this.shipDate = shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Order shipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
|
public Order shipDate(Date shipDate) {
|
||||||
this.shipDate = shipDate;
|
this.shipDate = shipDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -19,15 +19,15 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="A pet for sale in the pet store")
|
@ApiModel(description="A pet for sale in the pet store")
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Category category = null;
|
private Category category = null;
|
||||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
@ApiModelProperty(example = "null", required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
private List<String> photoUrls = new ArrayList<String>();
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private List<Tag> tags = new ArrayList<Tag>();
|
private List<Tag> tags = new ArrayList<Tag>();
|
||||||
|
|
||||||
@XmlType(name="StatusEnum")
|
@XmlType(name="StatusEnum")
|
||||||
@ -62,7 +62,7 @@ public enum StatusEnum {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "pet status in the store")
|
@ApiModelProperty(value = "pet status in the store")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="A tag for a pet")
|
@ApiModel(description="A tag for a pet")
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,21 +15,21 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
|||||||
@ApiModel(description="A User who is purchasing from the pet store")
|
@ApiModel(description="A User who is purchasing from the pet store")
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String username = null;
|
private String username = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String firstName = null;
|
private String firstName = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String lastName = null;
|
private String lastName = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String email = null;
|
private String email = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String password = null;
|
private String password = null;
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String phone = null;
|
private String phone = null;
|
||||||
@ApiModelProperty(example = "null", value = "User Status")
|
@ApiModelProperty(value = "User Status")
|
||||||
private Integer userStatus = null;
|
private Integer userStatus = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user