@DELETE @Path("/{customerId}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @ApiOperation( value = "Deletes an existing customer", notes = "This will delete a customer with supplied id", response = Customer.class) @ApiResponses(value = {@ApiResponse(code = 200, message = "Customer has been deleted")}) public Response deleteCustomer( @PathParam("customerId") @ApiParam(value = "customer id to delete", defaultValue = "1", required = true) final String customerId) throws Exception { final Customer deletedCustomer = service.deleteCustomer(customerId); if (deletedCustomer != null) { return Response.ok().entity(deletedCustomer).build(); } else { return Response.ok().entity(noCustomerToDelete()).build(); } }