From 3bd2c0913d18bb6e43feff2319d7fcf0fcf8937c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 20 Oct 2024 19:13:27 -0400 Subject: [PATCH] Update latest OpenAPI spec (#4) Co-authored-by: LocalStack Bot --- openapi/emulators/localstack-spec-latest.yml | 166 +++++++++++++++---- 1 file changed, 131 insertions(+), 35 deletions(-) diff --git a/openapi/emulators/localstack-spec-latest.yml b/openapi/emulators/localstack-spec-latest.yml index 49fb684..598dc42 100644 --- a/openapi/emulators/localstack-spec-latest.yml +++ b/openapi/emulators/localstack-spec-latest.yml @@ -218,6 +218,66 @@ components: - error - subscription_arn type: object + ReceiveMessageRequest: + type: object + description: https://github.com/boto/botocore/blob/develop/botocore/data/sqs/2012-11-05/service-2.json + required: + - QueueUrl + properties: + QueueUrl: + type: string + format: uri + AttributeNames: + type: array + items: + type: string + MessageSystemAttributeNames: + type: array + items: + type: string + MessageAttributeNames: + type: array + items: + type: string + MaxNumberOfMessages: + type: integer + VisibilityTimeout: + type: integer + WaitTimeSeconds: + type: integer + ReceiveRequestAttemptId: + type: string + ReceiveMessageResult: + type: object + description: https://github.com/boto/botocore/blob/develop/botocore/data/sqs/2012-11-05/service-2.json + properties: + Messages: + type: array + items: + $ref: '#/components/schemas/Message' + Message: + type: object + properties: + MessageId: + type: + - string + - 'null' + ReceiptHandle: + type: + - string + - 'null' + MD5OfBody: + type: + - string + - 'null' + Body: + type: + - string + - 'null' + Attributes: + type: object + MessageAttributes: + type: object CloudWatchMetrics: additionalProperties: false properties: @@ -438,6 +498,30 @@ components: type: integer description: Network latency in milliseconds. By default, 0 is used. minimum: 0 + PodRemote: + type: object + description: Details of a pod remote + properties: + name: + type: string + description: Name of the remote. + protocols: + type: array + items: + type: string + description: Supported protocols of the remote. + token: + type: object + description: The token for this remote. + url: + type: string + description: URL of the remote server. + example: + name: example_remote + protocols: + - http + - https + remote_url: https://example.com paths: /_aws/cloudwatch/metrics/raw: get: @@ -708,14 +792,54 @@ paths: '200': content: text/xml: {} + application/json: + schema: + $ref: '#/components/schemas/ReceiveMessageResult' description: SQS queue messages '400': content: text/xml: {} + application/json: {} description: Bad request '404': content: text/xml: {} + application/json: {} + description: Not found + post: + summary: Retrieves one or more messages from the specified queue. + description: 'This API receives messages from an SQS queue. + + https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html#API_ReceiveMessage_ResponseSyntax + + ' + operationId: receive_message + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ReceiveMessageRequest' + application/json: + schema: + $ref: '#/components/schemas/ReceiveMessageRequest' + responses: + '200': + content: + text/xml: {} + application/json: + schema: + $ref: '#/components/schemas/ReceiveMessageResult' + description: SQS queue messages + '400': + content: + text/xml: {} + application/json: {} + description: Bad request + '404': + content: + text/xml: {} + application/json: {} description: Not found /_aws/sqs/messages/{region}/{account_id}/{queue_name}: get: @@ -746,14 +870,19 @@ paths: '200': content: text/xml: {} + application/json: + schema: + $ref: '#/components/schemas/ReceiveMessageResult' description: SQS queue messages '400': content: text/xml: {} + application/json: {} description: Bad request '404': content: text/xml: {} + application/json: {} description: Not found /_localstack/config: get: @@ -1430,22 +1559,7 @@ paths: remotes: type: array items: - type: object - properties: - name: - type: string - description: Name of the remote. - protocols: - type: array - items: - type: string - description: Supported protocols of the remote. - token: - type: object - description: The token for this remote. - url: - type: string - description: URL of the remote server. + $ref: '#/components/schemas/PodRemote' /_localstack/pods/remotes/{name}: get: summary: Get a specific remote @@ -1467,25 +1581,7 @@ paths: content: application/json: schema: - type: object - properties: - name: - type: string - description: Name of the remote. - protocols: - type: array - items: - type: string - description: Supported protocols of the remote. - remote: - type: string - description: URL of the remote server. - example: - name: example_remote - protocols: - - http - - https - remote_url: https://example.com + $ref: '#/components/schemas/PodRemote' post: summary: Create a new remote description: Creates a new remote with the specified name and configuration.