class UserController {

    @ApiOperation(value = "Update User")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = HttpStatuses.OK),
            @ApiResponse(code = 303, message = HttpStatuses.SEE_OTHER),
            @ApiResponse(code = 400, message = HttpStatuses.BAD_REQUEST),
            @ApiResponse(code = 403, message = HttpStatuses.FORBIDDEN)
    })
    @PatchMapping
    public ResponseEntity updateUser(@Valid @RequestBody UserUpdateDto dto,
                                     @ApiIgnore @AuthenticationPrincipal Principal principal) {
        String email = principal.getName();
        userService.update(dto, email);
        return ResponseEntity.status(HttpStatus.OK).build();
    }

}