@RemoteResource(path="/petstore") public interface PetStore
Modifier and Type | Method and Description |
---|---|
Ok |
createUsers(User[] users) |
Ok |
deleteOrder(long orderId) |
Ok |
deletePet(String apiKey,
long petId) |
Ok |
deleteUser(String username) |
Collection<Pet> |
findPetsByStatus(PetStatus[] status) |
Collection<Pet> |
findPetsByTags(String[] tags)
Deprecated.
|
Order |
getOrder(long orderId) |
Collection<Order> |
getOrders() |
Pet |
getPet(long petId) |
Collection<Pet> |
getPets() |
Map<PetStatus,Integer> |
getStoreInventory() |
User |
getUser(String username) |
Collection<User> |
getUsers() |
Ok |
login(String username,
String password,
Value<Integer> rateLimit,
Value<ExpiresAfter> expiresAfter,
RestRequest req,
RestResponse res) |
Ok |
logout() |
long |
placeOrder(long petId,
String username) |
long |
postPet(CreatePet pet) |
Ok |
postUser(User user) |
Ok |
updatePet(UpdatePet pet) |
Ok |
updateUser(String username,
User user) |
@RemoteMethod(method="GET", path="/pet") Collection<Pet> getPets() throws NotAcceptable
NotAcceptable
@RemoteMethod(path="/pet/{petId}") Pet getPet(@Path(name="petId",description="ID of pet to return",example="123") long petId) throws IdNotFound, NotAcceptable
IdNotFound
NotAcceptable
@RemoteMethod long postPet(@Body(description="Pet object to add to the store") CreatePet pet) throws IdConflict, NotAcceptable, UnsupportedMediaType
@RemoteMethod(method="PUT", path="/pet/{petId}") Ok updatePet(@Body(description="Pet object that needs to be added to the store") UpdatePet pet) throws IdNotFound, NotAcceptable, UnsupportedMediaType
@RemoteMethod(method="GET", path="/pet/findByStatus") Collection<Pet> findPetsByStatus(@Query(name="status",description="Status values that need to be considered for filter.",required=true,type="array",collectionFormat="csv",items=@Items(type="string",_enum="AVAILABLE,PENDING,SOLD",_default="AVAILABLE"),example="AVALIABLE,PENDING") PetStatus[] status) throws NotAcceptable
NotAcceptable
@RemoteMethod(method="GET", path="/pet/findByTags") @Deprecated Collection<Pet> findPetsByTags(@Query(name="tags",description="Tags to filter by",required=true,example="[\'tag1\',\'tag2\']") String[] tags) throws InvalidTag, NotAcceptable
InvalidTag
NotAcceptable
@RemoteMethod(method="DELETE", path="/pet/{petId}") Ok deletePet(@Header(name="api_key",description="Security API key",required=true,example="foobar") String apiKey, @Path(name="petId",description="Pet id to delete",example="123") long petId) throws IdNotFound, NotAcceptable
IdNotFound
NotAcceptable
@RemoteMethod(method="GET", path="/store/order") Collection<Order> getOrders() throws NotAcceptable
NotAcceptable
@RemoteMethod(method="GET", path="/store/order/{orderId}") Order getOrder(@Path(name="orderId",description="ID of order to fetch",maximum="1000",minimum="1",example="123") long orderId) throws InvalidId, IdNotFound, NotAcceptable
InvalidId
IdNotFound
NotAcceptable
@RemoteMethod(method="POST", path="/store/order") long placeOrder(@FormData(name="petId",description="Pet ID") long petId, @FormData(name="username",description="The username of the user creating the order") String username) throws IdConflict, NotAcceptable, UnsupportedMediaType
@RemoteMethod(method="DELETE", path="/store/order/{orderId}") Ok deleteOrder(@Path(name="orderId",description="ID of the order that needs to be deleted",minimum="1",example="5") long orderId) throws InvalidId, IdNotFound, NotAcceptable
InvalidId
IdNotFound
NotAcceptable
@RemoteMethod(method="GET", path="/store/inventory") Map<PetStatus,Integer> getStoreInventory() throws NotAcceptable
NotAcceptable
@RemoteMethod(method="GET", path="/user") Collection<User> getUsers() throws NotAcceptable
NotAcceptable
@RemoteMethod(method="GET", path="/user/{username}") User getUser(@Path(name="username",description="The name that needs to be fetched. Use user1 for testing.") String username) throws InvalidUsername, IdNotFound, NotAcceptable
InvalidUsername
IdNotFound
NotAcceptable
@RemoteMethod Ok postUser(@Body(description="Created user object") User user) throws InvalidUsername, IdConflict, NotAcceptable, UnsupportedMediaType
@RemoteMethod(method="POST", path="/user/createWithArray") Ok createUsers(@Body(description="List of user objects") User[] users) throws InvalidUsername, IdConflict, NotAcceptable, UnsupportedMediaType
@RemoteMethod(method="PUT", path="/user/{username}") Ok updateUser(@Path(name="username",description="Name that need to be updated") String username, @Body(description="Updated user object") User user) throws InvalidUsername, IdNotFound, NotAcceptable, UnsupportedMediaType
@RemoteMethod(method="DELETE", path="/user/{username}") Ok deleteUser(@Path(name="username",description="The name that needs to be deleted") String username) throws InvalidUsername, IdNotFound, NotAcceptable
InvalidUsername
IdNotFound
NotAcceptable
@RemoteMethod(method="GET", path="/user/login") Ok login(@Query(name="username",description="The username for login",required=true,example="myuser") String username, @Query(name="password",description="The password for login in clear text",required=true,example="abc123") String password, @ResponseHeader(name="X-Rate-Limit",type="integer",format="int32",description="Calls per hour allowed by the user.",example="123") Value<Integer> rateLimit, Value<ExpiresAfter> expiresAfter, RestRequest req, RestResponse res) throws InvalidLogin, NotAcceptable
InvalidLogin
NotAcceptable
@RemoteMethod(method="GET", path="/user/logout") Ok logout() throws NotAcceptable
NotAcceptable
Copyright © 2018 Apache. All rights reserved.