@Path("P") public static class SB02 { public String f1; } @RestMethod(name=GET,path="/autoDetectBean/{P}")
@RemoteMethod(method=DELETE, path="/user/{username}") public Ok deleteUser( @Path( name="username", description="The name that needs to be deleted" ) String username ) throws InvalidUsername, IdNotFound, NotAcceptable;
@RemoteMethod(method=GET, path="/store/order/{orderId}") public Order getOrder( @Path( name="orderId", description="ID of order to fetch", maximum="1000", minimum="1", example="123" ) long orderId ) throws InvalidId, IdNotFound, NotAcceptable;
@RemoteMethod(path="/pet/{petId}") /* method inferred from method name */ public Pet getPet( @Path( name="petId", description="ID of pet to return", example="123" ) long petId ) throws IdNotFound, NotAcceptable;
@RemoteMethod(method=DELETE, path="/store/order/{orderId}") public 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;
@RemoteMethod(method=GET, path="/user/{username}") public User getUser( @Path( name="username", description="The name that needs to be fetched. Use user1 for testing." ) String username ) throws InvalidUsername, IdNotFound, NotAcceptable;
@RemoteMethod(method=DELETE, path="/user/{username}") public Ok deleteUser( @Path( name="username", description="The name that needs to be deleted" ) String username ) throws InvalidUsername, IdNotFound, NotAcceptable;
@RestMethod( name=DELETE, path="/{id}", summary="Delete a photo by ID" ) public String deletePhoto(@Path("id") String id) throws NotFound { Photo p = photos.remove(id); if (p == null) throw new NotFound("Photo not found"); return "OK"; }
@RestMethod( name=DELETE, path="/{id}", summary="Delete a photo by ID" ) public String deletePhoto(@Path("id") String id) throws NotFound { Photo p = photos.remove(id); if (p == null) throw new NotFound("Photo not found"); return "OK"; }
@RemoteMethod(method=PUT, path="/user/{username}") public 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;
@RestMethod(name=GET, path="/*") public String b(@Path("/*") String remainder) { return remainder; } }
@RestMethod(name=PUT, path="/classTransformOverridesParentClassTransform/{a}") public A a01c(@Path("a") A a) { return a; // Should return "A2-1". } @RestMethod(name=GET, path="/methodTransformOverridesClassTransform", pojoSwaps={SwapA3.class})
@RestMethod(name=GET, path="/Long/{x}/foo") public String c03(@Path(name="x") Long x) { return String.valueOf(x); } @RestMethod(name=GET, path="/Character/{x}/foo")
@RestMethod(name=GET, path="/Character/{x}/foo") public String c04(@Path(name="x") Character x) { return String.valueOf(x); } @RestMethod(name=GET, path="/Float/{x}/foo")
@RestMethod( name=DELETE, path="/*", summary="Delete log file", description="Delete a log file on the file system." ) public RedirectToRoot deleteFile(@Path("/*") String path) throws MethodNotAllowed { deleteFile(getFile(path)); return new RedirectToRoot(); }
@RestMethod( name=DELETE, path="/*", summary="Delete file", description="Delete a file on the file system." ) public RedirectToRoot deleteFile(@Path("/*") String path) throws MethodNotAllowed { deleteFile(getFile(path)); return new RedirectToRoot(); }
@Body @Response @ResponseHeader @X public static class A01 { @Query @Header @FormData @Path @Schema public int f1; }