Skip to content

Conversation

jacopocarlini
Copy link
Contributor

@jacopocarlini jacopocarlini commented Oct 3, 2025

List of Changes

  • now the max number of items per page is 1000
  • flowDate and publishedGt request params have now max 1 month
  • flowDate and publishedGt request params default to previous month if not provided
  • updated openapi

Motivation and Context

Added contraint to GET /organizations/{organizationId}/fdrs API to avoid performance issue

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jacopocarlini jacopocarlini requested a review from a team as a code owner October 3, 2025 09:46
Copy link
Contributor

github-actions bot commented Oct 3, 2025

The default action is to increase the PATCH number of SEMVER. Set IGNORE-FOR-RELEASE if you want to skip SEMVER bump. BREAKING-CHANGE and NEW-RELEASE must be run from GH Actions section manually.

Copy link
Contributor

github-actions bot commented Oct 3, 2025

The default action is to increase the PATCH number of SEMVER. Set IGNORE-FOR-RELEASE if you want to skip SEMVER bump. BREAKING-CHANGE and NEW-RELEASE must be run from GH Actions section manually.

Copy link
Contributor

github-actions bot commented Oct 3, 2025

This pull request does not contain a valid label. Please add one of the following labels: [major, minor, patch, patch, skip]

@jacopocarlini jacopocarlini changed the title limit chore: Add limit for pagination and flowDate Oct 3, 2025
…ery param and added constraint to publishedGt
…ery param and added constraint to publishedGt and updated openapi
…7-limit

# Conflicts:
#	src/test/java/it/gov/pagopa/fdr/controller/organizations/OrganizationsControllerTest.java
#	src/test/java/it/gov/pagopa/fdr/test/util/TestUtil.java
Comment on lines 41 to 44
Instant now = Instant.now();
ZonedDateTime nowUtc = now.atZone(ZoneOffset.UTC);
ZonedDateTime limitZoned = nowUtc.minusMonths(1);
Instant defaultDate = limitZoned.toInstant();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these 4 lines be compacted?

Comment on lines 29 to 30
Instant now = Instant.now();
ZonedDateTime nowUtc = now.atZone(ZoneOffset.UTC);
Copy link
Contributor

Choose a reason for hiding this comment

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

As before

Comment on lines 32 to 33
ZonedDateTime limitZoned = nowUtc.minus(relativeValue, relativeUnit);
Instant limitDate = limitZoned.toInstant();
Copy link
Contributor

Choose a reason for hiding this comment

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

As before

Copy link

sonarqubecloud bot commented Oct 9, 2025

Copy link
Contributor

@FedericoRuzzier FedericoRuzzier left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants