class UserController {

    @ApiOperation(value = "Save one or multiple habits for current user.")
    @ApiResponses(value = {
            @ApiResponse(code = 201, message = HttpStatuses.CREATED),
            @ApiResponse(code = 400, message = HttpStatuses.BAD_REQUEST),
            @ApiResponse(code = 403, message = HttpStatuses.FORBIDDEN),
    })
    @PostMapping("/{userId}/habit")
    public ResponseEntity<List<HabitCreateDto>> saveUserHabits(
            @Valid @RequestBody List<HabitIdDto> dto,
            @ApiParam("Id of current user. Cannot be empty.")
            @PathVariable @CurrentUserId Long userId,
            @ApiParam(value = "Code of the needed language.")
            @RequestParam @ValidLanguage String language) {
        return ResponseEntity
                .status(HttpStatus.CREATED)
                .body(userService.createUserHabit(userId, dto, language));
    }

}