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 3 commits
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
69 changes: 33 additions & 36 deletions sns/json_schemas/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,38 @@
"$ref": "#/definitions/identifier"
},
"filterPolicy": {
"$ref": "#/definitions/filterPolicy"
"type": "object",
"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"
}
},
"additionalProperties": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
},
{
"type": "object"
}
]
}
},
"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.

"type": "string",
"description": "Determines whether the filterPolicy applies to MessageAttributes or MessageBody.",
"enum": [
"MessageAttributes",
"MessageBody"
],
"default": "MessageAttributes"
},
"rawMessageDelivery": {
"type": "boolean",
Expand Down Expand Up @@ -167,40 +198,6 @@
}
}
},
"filterPolicy": {
"type": "object",
"description": "Only receive a subset of messages from the channel, determined by this policy.",
"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"
}
]
}
}
},
"required": [
"attributes"
]
},
"redrivePolicy": {
"type": "object",
"description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.",
Expand Down Expand Up @@ -274,4 +271,4 @@
]
}
]
}
}