@ApiOperation( value = "Publish LunchMenu.", notes = "Returns NO_CONTENT if publication was successful.") @ApiResponses( value = { @ApiResponse(code = 401, message = "Only authenticated access allowed."), @ApiResponse(code = 403, message = "Only user of ADMIN role can have access to it."), @ApiResponse(code = 404, message = "LunchMenu with such Id not found."), }) @PreAuthorize("hasAuthority('ADMIN')") @RequestMapping(value = "/{id}/publish", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT) public void publishLunchMenu( @ApiParam(value = "ID of LunchMenu from DB", required = true) @PathVariable Long id) { LOGGER.debug("Publish LunchMenu {} ", id); try { lunchMenusService.publishLunchMenu(id); } catch (NoSuchElementException exception) { throw new ExceptionLunchMenuNotFound(exception.getMessage()); } }