@Test public void testGetXML() { given().accept(XML).when().header(testHeader).get("/api/items/{id}", 1).then().body("item.@id", equalTo("1")); }
@GET("/{id: [0-9]+}") @ApiSummary("Get an item by id") @Return(code = 200, description = "Successful operation", onResult = Item.class) @Return(code = 404, description = "Item not found") @Metered public Item get(@Desc("ID of the item to retrieve") int id) { Item item = dao.get(id); return item; }
ItemsController extends ApiController { @GET("/{id: [0-9]+}") @ApiSummary("Get an item by id") @Return(code = 200, description = "Successful operation", onResult = Item.class) @Return(code = 404, description = "Item not found") @Metered public Item get(@Desc("ID of the item to retrieve") int id) { Item item = dao.get(id); return item; } }
ItemsController extends ApiController { @GET("/{id: [0-9]+}") @ApiSummary("Get an item by id") @Return(code = 200, description = "Successful operation", onResult = Item.class) @Return(code = 404, description = "Item not found") @Metered public Item get(@Desc("ID of the item to retrieve") int id) { Item item = dao.get(id); return item; }  }
ItemsController extends ApiController { @GET("/{id: [0-9]+}") @ApiSummary("Get an item by id") @Return(code = 200, description = "Successful operation", onResult = Item.class) @Return(code = 404, description = "Item not found") @Metered public Item get(@Desc("ID of the item to retrieve") int id) { Item item = dao.get(id); return item; }  @GET("/{id: [0-9]+}") @ApiSummary("Get an item by id") @Return(code = 200, description = "Successful operation", onResult = Item.class) @Return(code = 404, description = "Item not found") @Metered Item get(@Desc("ID of the item to retrieve") int id); }
ItemsController extends ApiController { @GET("/{id: [0-9]+}") @ApiSummary("Get an item by id") @Return(code = 200, description = "Successful operation", onResult = Item.class) @Return(code = 404, description = "Item not found") @Metered public Item get(@Desc("ID of the item to retrieve") int id) { Item item = dao.get(id); return item; }  @GET("/{id: [0-9]+}") @ApiSummary("Get an item by id") @Return(code = 200, description = "Successful operation", onResult = Item.class) @Return(code = 404, description = "Item not found") @Metered Item get(@Desc("ID of the item to retrieve") int id);  }