registerUser

@Post(value = "register/")
open override fun registerUser(@Body request: RegisterUserRequest): HttpResponse<RegisterUserResponse>

Handles POST users/register/.

Validates input data, maps incoming DTOs to domain entities, and delegates registration to the application layer.

Response mapping:

  • 200 OK when registration succeeds

  • 400 Bad Request when payload validation fails

  • 401 Unauthorized when the user is already registered

  • 500 Internal Server Error when the registration use case reports a failure

Return

An HTTP response representing the registration outcome.

Parameters

request

Registration payload containing user data and credentials data.