Admiral-Piett / goaws

AWS (SQS/SNS) Clone for Development testing
MIT License
788 stars 146 forks source link

Fix data structure and tag name of ListSubscriptionsByTopicResult #242

Closed seven1m closed 2 years ago

seven1m commented 2 years ago

This was returning <ListSubscriptionsResult> in the payload, causing the AWS CLI to parse the response incorrectly.

Before:

aws --endpoint-url http://localhost:4100 sns list-subscriptions-by-topic --topic-arn="arn:aws:sns:us-east-1:100010001000:local-topic1"

'ListSubscriptionsByTopicResult'

After:

aws --endpoint-url http://localhost:4100 sns list-subscriptions-by-topic --topic-arn="arn:aws:sns:us-east-1:100010001000:local-topic1"
{
    "Subscriptions": [
        {
            "SubscriptionArn": "arn:aws:sns:us-east-1:100010001000:local-topic1:613f2fe9-6a92-4bef-8d9a-3a6bca845a0f",
            "Owner": "",
            "Protocol": "sqs",
            "Endpoint": "arn:aws:sqs:us-east-1:100010001000:local-queue3",
            "TopicArn": "arn:aws:sns:us-east-1:100010001000:local-topic1"
        },
        {
            "SubscriptionArn": "arn:aws:sns:us-east-1:100010001000:local-topic1:99599561-1a71-415f-bbad-af30b14718f1",
            "Owner": "",
            "Protocol": "sqs",
            "Endpoint": "arn:aws:sqs:us-east-1:100010001000:local-queue4",
            "TopicArn": "arn:aws:sns:us-east-1:100010001000:local-topic1"
        }
    ]
}
seven1m commented 2 years ago

Any interest in this PR? Is this an active project @p4tin?

seven1m commented 2 years ago

Closing this to keep my PRs tab tidy. Feel free to reopen if you want to try again.