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

docs: update FilterPolicy config to match AWS API #215

Merged
merged 7 commits into from
Sep 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 29 additions & 26 deletions sns/json_schemas/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
"filterPolicy": {
"$ref": "#/definitions/filterPolicy"
},
"filterPolicyScope": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As filterPolicy and filterPolicyScope will be properties directly on the object they don't need to be $ref'd.

"$ref": "#/definitions/filterPolicyScope"
},
"rawMessageDelivery": {
"type": "boolean",
"description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body."
Expand Down Expand Up @@ -169,37 +172,37 @@
},
"filterPolicy": {
"type": "object",
"description": "Only receive a subset of messages from the channel, determined by this policy.",
"description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.",
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension"
}
},
"properties": {
"attributes": {
"type": "object",
"description": "A map of a message attribute to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.",
"additionalProperties": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
},
{
"type": "object"
}
]
"additionalProperties": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
},
{
"type": "object"
}
}
},
"required": [
"attributes"
]
]
}
},
"filterPolicyScope": {
"type": "string",
"description": "Determines whether the filterPolicy applies to MessageAttributes or MessageBody.",
"enum": [
"MessageAttributes",
"MessageBody"
],
"default": "MessageAttributes"
},
"redrivePolicy": {
"type": "object",
Expand Down Expand Up @@ -274,4 +277,4 @@
]
}
]
}
}