diff --git a/localstack-core/localstack/openapi.yaml b/localstack-core/localstack/openapi.yaml index 666d4ac5b1e89..93388ead5367f 100644 --- a/localstack-core/localstack/openapi.yaml +++ b/localstack-core/localstack/openapi.yaml @@ -21,13 +21,20 @@ servers: default: 'localhost.localstack.cloud' components: parameters: - SesMessageId: - description: ID of the message (`id` field of SES message) + SesIdFilter: + description: Filter for the `id` field in SES message in: query name: id required: false schema: type: string + SesEmailFilter: + description: Filter for the `source` field in SES message + in: query + name: email + required: false + schema: + type: string SnsAccountId: description: '`accountId` field of the resource' in: query @@ -124,6 +131,26 @@ components: - completed - scripts type: object + SESDestination: + type: object + description: Possible destination of a SES message + properties: + ToAddresses: + type: array + items: + type: string + format: email + CcAddresses: + type: array + items: + type: string + format: email + BccAddresses: + type: array + items: + type: string + format: email + additionalProperties: false SesSentEmail: additionalProperties: false properties: @@ -139,7 +166,7 @@ components: - text_part type: object Destination: - type: string + $ref: '#/components/schemas/SESDestination' Id: type: string RawData: @@ -160,13 +187,7 @@ components: - Id - Region - Timestamp - - Destination - - RawData - Source - - Subject - - Template - - TemplateData - - Body type: object SessionInfo: additionalProperties: false @@ -420,7 +441,7 @@ paths: operationId: discard_ses_messages tags: [aws] parameters: - - $ref: '#/components/parameters/SesMessageId' + - $ref: '#/components/parameters/SesIdFilter' responses: '204': description: Message was successfully discarded @@ -429,13 +450,8 @@ paths: operationId: get_ses_messages tags: [aws] parameters: - - $ref: '#/components/parameters/SesMessageId' - - description: Source of the message (`source` field of SES message) - in: query - name: email - required: false - schema: - type: string + - $ref: '#/components/parameters/SesIdFilter' + - $ref: '#/components/parameters/SesEmailFilter' responses: '200': content: @@ -580,7 +596,9 @@ paths: responses: '200': content: - text/xml: {} + text/xml: + schema: + $ref: '#/components/schemas/ReceiveMessageResult' application/json: schema: $ref: '#/components/schemas/ReceiveMessageResult' diff --git a/tests/aws/services/ses/test_ses.py b/tests/aws/services/ses/test_ses.py index c38ffcd8a0234..b9ba8fe976b8e 100644 --- a/tests/aws/services/ses/test_ses.py +++ b/tests/aws/services/ses/test_ses.py @@ -872,6 +872,7 @@ def test_special_tags_send_email(self, tag_name, tag_value, aws_client): assert exc.match("MessageRejected") +@pytest.mark.usefixtures("openapi_validate") class TestSESRetrospection: @markers.aws.only_localstack def test_send_email_can_retrospect(self, aws_client):