swagger.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ---
  2. swagger: "2.0"
  3. info:
  4. version: "2016-12-20T18:27:47Z"
  5. title: "twilio-apigateway"
  6. basePath: "/Prod"
  7. schemes:
  8. - "https"
  9. paths:
  10. /addphoto:
  11. get:
  12. consumes:
  13. - "application/json"
  14. produces:
  15. - "application/xml"
  16. responses:
  17. 200:
  18. description: "200 response"
  19. headers:
  20. Content-Type:
  21. type: "string"
  22. x-amazon-apigateway-integration:
  23. responses:
  24. default:
  25. statusCode: "200"
  26. responseTemplates:
  27. application/xml: "#set($inputRoot = $input.path('$'))\n<?xml version=\"\
  28. 1.0\" encoding=\"UTF-8\"?>\n<Response>\n <Message>\n <Body>\n\
  29. \ $inputRoot\n </Body>\n </Message>\n</Response> "
  30. responseParameters:
  31. method.response.header.Content-Type: "'application/xml'"
  32. requestTemplates:
  33. application/json: "{\n \"body\" : \"$input.params('Body')\",\n \"\
  34. fromNumber\" : \"$input.params('From')\",\n \"image\" : \"$input.params('MediaUrl0')\"\
  35. ,\n \"numMedia\" : \"$input.params('NumMedia')\"\n}"
  36. # NOTE: Replace <<region>> and <<account>> fields
  37. uri: arn:aws:apigateway:<<region>>:lambda:path/2015-03-31/functions/arn:aws:lambda:<<region>>:<<accountId>>:function:${stageVariables.LambdaFunctionName}/invocations
  38. passthroughBehavior: "when_no_templates"
  39. httpMethod: "POST"
  40. contentHandling: "CONVERT_TO_TEXT"
  41. type: "aws"