diff --git a/sns/json_schemas/operation.json b/sns/json_schemas/operation.json index df59a327..730a4ad9 100644 --- a/sns/json_schemas/operation.json +++ b/sns/json_schemas/operation.json @@ -97,6 +97,9 @@ "filterPolicy": { "$ref": "#/definitions/filterPolicy" }, + "filterPolicyScope": { + "$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." @@ -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", @@ -274,4 +277,4 @@ ] } ] -} \ No newline at end of file +}