feature/level-2-restful-frequency #1

Merged
forgejo merged 3 commits from feature/level-2-restful-frequency into main 2026-08-29 10:41:32 +02:00
Owner
No description provided.
- Change base path from /api/word-frequency to /api/words/frequency
- Convert POST endpoints with JSON bodies to GET with query parameters
- /api/words/frequency/most - top N frequent words
- /api/words/frequency - frequency of specific word
- /api/words/frequency/highest - highest frequency value
- Add spring-boot-starter-validation for parameter validation
- Add ConstraintViolationException handler for proper 400 responses
- Return 204 No Content for empty/missing results
- Clean up unused imports in WordFrequencyAnalyzer interface
- Rewrite controller tests for GET endpoints with query params
- All 29 tests pass
- Add v1 prefix to API endpoints (/api/v1/words/frequency/...)
- Introduce WordFrequencyService interface and implementation
- Create validation components (ValidateTextNotBlank, ValidateTextAndWordNotBlank, ValidateTextNotBlankAndNPositive)
- Move validation logic from controller to service layer
- Replace 204 responses with 404 for missing resources (Richardson Level 2)
- Use 400 for invalid input via @Min validation on controller
- Controller delegates entirely to service layer
- All 29 tests pass
- Flatten WordFrequencyAnalyzerTest: 3 nested classes → 1 class with 13 tests
- Flatten WordFrequencyControllerTest: 3 nested classes → 1 class with 16 tests
- All test method names are now unique to avoid compilation errors
- Test class names match the classes they test (WordFrequencyAnalyzerTest, WordFrequencyControllerTest)
forgejo deleted branch feature/level-2-restful-frequency 2026-08-29 10:41:32 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/wordcount!1
No description provided.