I have implemented the x-amazon-apigateway to directly push the request to an SQS Queue from the API Gateway. I am getting the default XML response after posting a soap request using Postman. I wanted to receive a custom XML response. I am using openapi 3.0.1 yaml file for the integration. However the code to do this is not working and I am still getting the default XML response. Any idea on how to do it?
openapi: "3.0.1"
info:
title: API
description: "API that integrates SQS with API Gateway"
version: "1.0"
paths:
/:
post:
responses:
default:
description: "Response for POST /"
x-amazon-apigateway-integration:
type: "aws_proxy"
integrationSubtype: "SQS-SendMessage"
credentials:
Fn::GetAtt: [APIHttpRole, Arn]
connectionType: "INTERNET"
payloadFormatVersion: "1.0"
requestParameters:
MessageBody: "$request.body"
QueueUrl:
Ref: mySQS
responses:
default:
statusCode: "200"
responseTemplate:
application/xml: >-
<Body>Sucess</Body>