{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--api.gateway.v1.json",
  "description": "File containing similar api gateway related configurations",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/components/api.gateway.v1.json",
    "sourceSha256": "67392750260433a75feadd6721a723a7239cac4c260473f608956309be3a39fb"
  },
  "type": "object",
  "id": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/components/api.gateway.v1.json",
  "schema": "https://json-schema.org/draft-07/schema#",
  "AwsHttpCors": {
    "description": "Enable cors or customizing cors response. Source:- <https://www.serverless.com/framework/docs/providers/aws/events/apigateway#enabling-cors>",
    "oneOf": [
      {
        "type": "boolean",
        "default": false
      },
      {
        "title": "AwsHttpCors",
        "type": "object",
        "additionalProperties": false,
        "description": "Full custom configuration for cors",
        "properties": {
          "allowCredentials": {
            "type": "boolean"
          },
          "cacheControl": {
            "type": "string"
          },
          "headers": {
            "oneOf": [
              {
                "items": {
                  "type": "string",
                  "default": [
                    "Content-Type",
                    "X-Amz-Date",
                    "Authorization",
                    "X-Api-Key",
                    "X-Amz-Security-Token",
                    "X-Amz-User-Agent",
                    "X-Amzn-Trace-Id"
                  ]
                },
                "type": "array"
              },
              {
                "type": "string",
                "enum": [
                  "*"
                ]
              }
            ]
          },
          "maxAge": {
            "type": "number"
          },
          "origin": {
            "type": "string",
            "default": "*"
          }
        }
      },
      {
        "title": "AwsHttpCorsMultipleOrigins",
        "type": "object",
        "additionalProperties": false,
        "description": "Full custom configuration for cors",
        "properties": {
          "allowCredentials": {
            "type": "boolean"
          },
          "cacheControl": {
            "type": "string"
          },
          "headers": {
            "oneOf": [
              {
                "items": {
                  "type": "string",
                  "default": [
                    "Content-Type",
                    "X-Amz-Date",
                    "Authorization",
                    "X-Api-Key",
                    "X-Amz-Security-Token",
                    "X-Amz-User-Agent",
                    "X-Amzn-Trace-Id"
                  ]
                },
                "type": "array"
              },
              {
                "type": "string",
                "enum": [
                  "*"
                ]
              }
            ]
          },
          "maxAge": {
            "type": "number"
          },
          "origins": {
            "oneOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string",
                "default": "*"
              }
            ]
          }
        }
      }
    ]
  },
  "additionalProperties": false,
  "required": [
    "AwsHttpCors"
  ]
}
