Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SNS.swift #6

Closed
wants to merge 1 commit into from

Conversation

WayneEld
Copy link

@WayneEld WayneEld commented Oct 8, 2021

Received SNS object has uppercased "URL" coding keys.

Motivation:

The received SNS object has uppercased "URL" coding keys. The object can not be decoded otherwise. Currently, the coding keys contain a lower case "Url", for example "SigningCertUrl" but should be "SigningCertURL".

{
  "Timestamp": "2021-10-08T11:18:40.043Z",
  "SigningCertURL": "https://sns.eu ****",
  "MessageId": "776e6308-8c44-5ee ****",
  "Type": "Notification",
  "SignatureVersion": "1",
  "Signature": "s71McLg8d9OP86E4a *****",
  "TopicArn": "arn:aws:sns:eu-west-1:06 *****",
  "UnsubscribeURL": "https://sns.eu-w****",
  "Message": "{\"action\":\"upload_document_version\",\"entityId\":\"1633691914791-1796da229943***aace80d5e023f3***c\",\"entityType\":\"DocumentVersion\",\"organizationId\":\"d-9367073c36\",\"parentEntityId\":\"516d7ab0537aff5d39a469439c*****2d0d4\",\"parentEntityType\":\"Document\"}"
}

Modifications:

The coding keys string value has been changed.

Result:

We can now use the decoded object with dot notation.

Received SNS object has uppercased "URL" coding keys.
@swift-server-bot
Copy link

Can one of the admins verify this patch?

3 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@fabianfett
Copy link
Member

Thanks @WayneEld Would you mind adding a test case for this as well? Just decoding the example struct you show, is sufficient. If we have this I'd be happy.

@WayneEld
Copy link
Author

Thanks @WayneEld Would you mind adding a test case for this as well? Just decoding the example struct you show, is sufficient. If we have this I'd be happy.

@fabianfett Sure thing. When I get some time I will get to the test cases and update the PR.

@tomerd
Copy link
Contributor

tomerd commented Dec 6, 2021

@swift-server-bot test this please

@tomerd tomerd closed this Jun 29, 2023
@tomerd
Copy link
Contributor

tomerd commented Jun 29, 2023

closed since this is has been outstanding for so long

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.

None yet

4 participants