Skip to content

Personalize responses per function

Compare
Choose a tag to compare
@YoruNoHikage YoruNoHikage released this 05 Apr 16:38
· 4 commits to master since this release

Add the ability to rewrite some x-amazon-apigateway-integration per function.

Small example serving css from the lambda:

{
  "x-api-gateway": {
    "tags": ["CSS"],
    "consumes": null,
    "produces": ["text/css; charset=utf-8"],
    "responses": {
      "200": {
        "schema": {
          "$ref": "#/definitions/Empty"
        }
      }
    },
    "x-amazon-apigateway-integration": {
      "responses": {
        "default": {
          "statusCode": "200",
          "responseTemplates": {
            "text/css": "$input.path('$')"
          }
        }
      }
    }
  }
}