Feature/get projects v1#43
Open
Joselee2908 wants to merge 7 commits into
Open
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
requested changes
Jul 15, 2026
jorge-romero
left a comment
Contributor
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(); |
Contributor
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) { |
Contributor
There was a problem hiding this comment.
As soon as you get the info from the database paged this will have changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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