Skip to content

refactor: [IOBP-000] Aligned biz event tag and data#574

Open
LeleDallas wants to merge 6 commits intomasterfrom
IOBP-2478-update-pagopa-infra-openapi
Open

refactor: [IOBP-000] Aligned biz event tag and data#574
LeleDallas wants to merge 6 commits intomasterfrom
IOBP-2478-update-pagopa-infra-openapi

Conversation

@LeleDallas
Copy link
Contributor

Short description

This pull request introduces enhancements and refactoring to the payments notices feature, focusing on improved test data generation, more flexible configuration for receipt endpoints, and updates to API model references

List of changes proposed in this pull request

  • Aligned OpenAPI specifications with IO App
  • Refactored the notice persistence logic in notices.ts to use an array for userNotices instead of a Map, simplifying add/remove operations and enabling easier ordering and shuffling of test data
  • Added a shuffleNotices function to randomize the order of notices at startup
  • Enhanced the mocked data generation to include cart notices with configurable payee names and tax codes, and to generate more realistic receipt subjects
  • Added a new receipts configuration section to IoDevServerConfig, allowing the /paids/:eventId/pdf endpoint to return a customizable 404 response (with a structured error object) if configured, instead of the default file or error
  • Updated the /paids/:eventId/pdf route to use the new pdfNotFoundResponse config value if present, and improved default error handling for missing attachments
  • Ensured that disabling a receipt only removes the user notice if the configured response code is 200

How to test

Verify receipt and cart receipt visibility in app

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant