Skip to content

Feature/get projects v1#43

Open
Joselee2908 wants to merge 7 commits into
developfrom
feature/get-projects-v1
Open

Feature/get projects v1#43
Joselee2908 wants to merge 7 commits into
developfrom
feature/get-projects-v1

Conversation

@Joselee2908

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

@jorge-romero jorge-romero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review the changes, I'll review the PR when these changes are applied.


@Override
public List<ProjectSummary> getProjects() {
List<ProjectEntity> projects = projectRepository.findAll();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As soon as you get the info from the database paged this will have changes.

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.

2 participants