Feature/get projects v1#43
Conversation
…tMapper, and ProjectsFacade
…traintViolationException
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |
jorge-romero
left a comment
There was a problem hiding this comment.
Please review the changes, I'll review the PR when these changes are applied.
|
|
||
| @Override | ||
| public List<ProjectSummary> getProjects() { | ||
| List<ProjectEntity> projects = projectRepository.findAll(); |
There was a problem hiding this comment.
Use JpaRepository.findAll(Pageable) (Spring Data Page) and pushing pagination down to the query/DB.
We are querying a database, it is needed to use the capabilities to get the pages from there.
| private static final int DEFAULT_SIZE = 20; | ||
| private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ISO_OFFSET_DATE_TIME; | ||
|
|
||
| public GetProjectsResponse toApiResponse(List<ProjectSummary> projects, Integer page, Integer size) { |
There was a problem hiding this comment.
As soon as you get the info from the database paged this will have changes.
|
📊 Static Analysis Summary🔍 Code Quality Checks
📦 Download detailed reports from the workflow artifacts. |



Created new endpoint: GET /api/pub/v1/projects to retrieve all projects filtered by size and page.
Examples:
GET /api/pub/v1/projects
GET /api/pub/v1/projects?page=0
GET /api/pub/v1/projects?size=50
GET /api/pub/v1/projects?page=3&size=20