chore: Add limit for pagination and flowDate#144
chore: Add limit for pagination and flowDate#144jacopocarlini wants to merge 13 commits intomainfrom
Conversation
|
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. |
|
The default action is to increase the |
|
This pull request does not contain a valid label. Please add one of the following labels: |
src/main/java/it/gov/pagopa/fdr/controller/interfaces/controller/IOrganizationsController.java
Outdated
Show resolved
Hide resolved
src/main/java/it/gov/pagopa/fdr/controller/interfaces/controller/IOrganizationsController.java
Outdated
Show resolved
Hide resolved
…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
| Instant now = Instant.now(); | ||
| ZonedDateTime nowUtc = now.atZone(ZoneOffset.UTC); | ||
| ZonedDateTime limitZoned = nowUtc.minusMonths(1); | ||
| Instant defaultDate = limitZoned.toInstant(); |
There was a problem hiding this comment.
Can these 4 lines be compacted?
| Instant now = Instant.now(); | ||
| ZonedDateTime nowUtc = now.atZone(ZoneOffset.UTC); |
| ZonedDateTime limitZoned = nowUtc.minus(relativeValue, relativeUnit); | ||
| Instant limitDate = limitZoned.toInstant(); |
|
| .pspId(pspId) | ||
| .publishedGt(publishedGt) | ||
| .flowDate(flowDate) | ||
| .publishedGt(publishedGt.orElse(defaultDate)) |
There was a problem hiding this comment.
i'n not sure on this chk.
on SANP specification we'll add a strong check data



List of Changes
flowDateandpublishedGtrequest params have now max 1 monthflowDateandpublishedGtrequest params default to previous month if not providedMotivation and Context
Added contraint to
GET /organizations/{organizationId}/fdrsAPI to avoid performance issueHow Has This Been Tested?
Screenshots (if appropriate):
Types of changes
expected)
Checklist: