-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/us04-81: endpoints para busca de UF e municipios brasileiros #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@femelloffm boa noite, falta ajustar os conflitos para finalizar o PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements endpoints for retrieving Brazilian states (UFs) and municipalities from the IBGE public API, creating necessary infrastructure for frontend dropdown components.
- Adds new REST endpoints (
/v1/states
and/v1/states/{id}/cities
) with JWT authentication - Integrates with IBGE API using RestTemplate with timeout configuration and error handling
- Implements comprehensive unit tests for all new components and fixes compilation issues
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
StateController.java |
New REST controller with endpoints for states and cities retrieval |
StateService.java |
Service layer handling business logic for state/city operations |
IbgeClient.java |
HTTP client for IBGE API integration with timeout and error handling |
RestTemplateConfig.java |
Configuration for RestTemplate with custom timeout settings |
Various DTOs | Data transfer objects for API requests/responses and IBGE integration |
GlobalExceptionHandler.java |
Added handler for ClientTimeoutException |
ClientTimeoutException.java |
New custom exception for API timeout scenarios |
Test files | Comprehensive unit tests for all new components and fixed import issues |
Configuration files | Added IBGE API URLs and security scheme documentation |
...ttils/src/main/java/com/pointtils/pointtils/src/application/controllers/StateController.java
Show resolved
Hide resolved
pointtils/src/main/java/com/pointtils/pointtils/src/application/clients/IbgeClient.java
Show resolved
Hide resolved
pointtils/src/main/java/com/pointtils/pointtils/src/application/clients/IbgeClient.java
Show resolved
Hide resolved
pointtils/src/test/java/com/pointtils/pointtils/src/application/clients/IbgeClientTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bom dia @femelloffm, PR aprovado! Parabéns pela contribuição 🥇
# Conflicts: # pointtils/src/main/java/com/pointtils/pointtils/src/infrastructure/configs/GlobalExceptionHandler.java # pointtils/src/test/resources/application.properties
|
Feat/us04-81: endpoints para busca de UF e municipios brasileiros
📍 Título
US04 - Criar endpoints para busca de UF e municipios brasileiros #81
📌 Descrição
Implementação de endpoints para buscar a lista de UFs brasileiras e a lista de municípios por UF, a partir da integração com uma API pública do IBGE. Estes endpoints serão necessários para os componentes de dropdown no frontend:
Correção de erros de compilação na branch dev.
Implementação de testes unitários e correções de issues do Sonar em classes de teste.
🧪 Testes realizados:
Sucesso em busca de UFs:
Sucesso em busca de municípios:
Sigla de UF inválida:
Erro de autenticação:
✅ Checklist
📎 Referências
#81