docs: update FilterPolicy config to match AWS API#215
docs: update FilterPolicy config to match AWS API#215dpwdec merged 7 commits intoasyncapi:masterfrom
Conversation
Currently, filterPolicy configuration outlined in this file does not match what is outlined in the AWS documentation and API - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html. The `filterPolicy` should only contain the JSON policy, so no need for the `attributes` property; which in itself was confusing as the policy can apply to the message attributes or body. Further to this, this definition file was missing the `filterPolicyScope` which is needed to determine whether the user wishes to filter on the message attributes or the body.
There was a problem hiding this comment.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
| "filterPolicy": { | ||
| "$ref": "#/definitions/filterPolicy" | ||
| }, | ||
| "filterPolicyScope": { |
There was a problem hiding this comment.
As filterPolicy and filterPolicyScope will be properties directly on the object they don't need to be $ref'd.
|
LGTM! @KhudaDad414 @iancooper You happy with the change? 🐸 |
|
@dpwdec Approved |
sounds odd to me. Are filterpolicies set by the event producer to be used by the consumer? |
Although the SNS subscription lives under the SNS remit it is under the control of the consumer of the topic. Filter policies are set by the consumer of the event, not the producer. It is the consumer who is deciding how they wish to consume the events sent by the producer, not the producer determining how their events should be consumed. |
|
Okay, Nevermind, it makes sense from the point of view of "we only receive events that fits this policy". |
|
Thanks @dpwdec and @iancooper for the approval. @KhudaDad414 can I get a review please? |
KhudaDad414
left a comment
There was a problem hiding this comment.
Schemas seems to match with README.
|
@dpwdec @KhudaDad414 just n info for future - that when you change structure of binding, you should update binding version too |
Currently, filterPolicy configuration outlined in this file does not match what is outlined in the AWS documentation and API - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html. The
filterPolicyshould only contain the JSON policy, so no need for theattributesproperty; which in itself was confusing as the policy can apply to the message attributes or body.Further to this, this definition file was missing the
filterPolicyScopewhich is needed to determine whether the user wishes to filter on the message attributes or the body.Description
Related issue(s)