Skip to content

feat(user-management): snake_case RegisterRequest, activate-account endpoint, validation constraints - #24

Merged
EdgarEldy merged 10 commits into
developfrom
feature/user-management
Nov 9, 2026
Merged

EdgarEldy merged 10 commits into
developfrom
feature/user-management

Conversation

@EdgarEldy

Copy link
Copy Markdown
Owner

Summary

  • Added @JsonProperty snake_case annotations to compound fields in RegisterRequest (first_name, last_name, confirm_password) for consistency with the rest of the API contract
  • Renamed activation endpoint from /activate to /activate-account across AuthController, SecurityConfig, EmailServiceImpl, and all tests
  • Fixed test _09_ShouldReturn400_WhenActivationTokenInvalid using the updated endpoint path

Test plan

  • 371 tests pass locally (mvn test)
  • CI green on this PR
  • Register payload with first_name, last_name, confirm_password accepted by the API
  • GET /api/v1/auth/activate-account?token=... activates accounts correctly

…fields

firstName, lastName, and confirmPassword are multi-word camelCase fields.
They must be serialised as first_name, last_name, and confirm_password in
the JSON contract, consistent with every other compound field across the
DTOs (see UserResponse, ProductResponse, CategoryResponse, etc.).

Single-word fields (username, email, password) need no annotation because
their Java name and the JSON key are identical.
Aligns the endpoint name with the kebab-case convention used by all
other multi-word paths in this project (forgot-password, reset-password).
The new path /api/v1/auth/activate-account is also more self-describing
for a client consuming the API.
Keeps the endpoint publicly accessible (no authentication required)
under its new path /api/v1/auth/activate-account.
The frontend route receiving the activation token is renamed from
/auth/activate to /auth/activate-account to match the backend
endpoint path change.
@EdgarEldy
EdgarEldy merged commit 053c7ca into develop Nov 9, 2026
2 checks passed
@EdgarEldy EdgarEldy mentioned this pull request Nov 9, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant