Skip to content

Fix notification history item validation - #452

Open
abhinavgautam01 wants to merge 1 commit into
apple:mainfrom
abhinavgautam01:fix/448-notification-history-validation
Open

Fix notification history item validation#452
abhinavgautam01 wants to merge 1 commit into
apple:mainfrom
abhinavgautam01:fix/448-notification-history-validation

Conversation

@abhinavgautam01

Copy link
Copy Markdown

Fixes #448

NotificationHistoryResponseValidator currently validates history entries using another response validator, allowing malformed signedPayload and sendAttempts fields to pass unchecked.

Use the existing NotificationHistoryResponseItemValidator so getNotificationHistory rejects malformed entries, including invalid nested send-attempt fields.

Add 12 API-client regression cases covering malformed values, omitted optional fields, empty arrays and unknown string enum values.

Validation

  • TypeScript build passed on Node 22.
  • Full Jest suite passed: 22 suites, 368 tests, including source and compiled tests.
  • All five malformed-item regression cases failed before the fix.
  • git diff --check passed.

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.

NotificationHistoryResponseValidator uses the response validator for history items and accepts malformed item fields

1 participant