{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--common.json",
  "description": "Sub schema to contain the most common shared definitions",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/components/common.json",
    "sourceSha256": "463d4c391299f6da7aa265cbf74f170c4fd8165b4103dc60c7125c5ea2c04f80"
  },
  "type": "object",
  "id": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/components/common.json",
  "schema": "https://json-schema.org/draft-07/schema#",
  "AwsInputTransformer": {
    "properties": {
      "inputPathsMap": {
        "additionalProperties": {
          "type": "string",
          "minLength": 1
        },
        "type": "object"
      },
      "inputTemplate": {
        "type": "string",
        "minLength": 1,
        "maxLength": 8192
      }
    },
    "type": "object",
    "required": [
      "inputTemplate"
    ]
  },
  "additionalProperties": false,
  "required": [
    "AwsFilterPatterns",
    "AwsSecretsManagerArnString",
    "AwsArnString",
    "AwsRegion",
    "AwsSupportedArchitecture",
    "AwsPackage",
    "AwsInputTransformer"
  ],
  "AwsFilterPatterns": {
    "type": "array",
    "minItems": 1,
    "maxItems": 10,
    "items": {
      "type": "object"
    }
  },
  "AwsSecretsManagerArnString": {
    "type": "string",
    "pattern": "arn:[a-z-]+:secretsmanager:[a-z0-9-]+:\\d+:secret:[A-Za-z0-9/_+=.@-]+"
  },
  "AwsArnString": {
    "type": "string",
    "pattern": "^arn:"
  },
  "AwsArnReference": {
    "oneOf": [
      {
        "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnRef"
      },
      {
        "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/FnGetAtt"
      },
      {
        "$ref": "#/AwsArnString"
      }
    ]
  },
  "AwsRegion": {
    "type": "string",
    "enum": [
      "us-east-1",
      "us-east-2",
      "us-gov-east-1",
      "us-gov-west-1",
      "us-iso-east-1",
      "us-iso-west-1",
      "us-isob-east-1",
      "us-west-1",
      "us-west-2",
      "af-south-1",
      "ap-east-1",
      "ap-northeast-1",
      "ap-northeast-2",
      "ap-northeast-3",
      "ap-south-1",
      "ap-south-2",
      "ap-southeast-1",
      "ap-southeast-2",
      "ap-southeast-3",
      "ap-southeast-4",
      "ca-central-1",
      "ca-west-1",
      "cn-north-1",
      "cn-northwest-1",
      "eu-central-1",
      "eu-central-2",
      "eu-north-1",
      "eu-south-1",
      "eu-south-2",
      "eu-west-1",
      "eu-west-2",
      "eu-west-3",
      "me-central-1",
      "me-south-1",
      "il-central-1",
      "sa-east-1"
    ]
  },
  "AwsSupportedArchitecture": {
    "type": "string",
    "enum": [
      "x86_64",
      "arm64"
    ],
    "description": "Processor architecture: 'x86_64' or 'arm64' via Graviton2 (default: x86_64)",
    "default": "x86_64"
  },
  "AwsPackage": {
    "title": "AwsPackage",
    "description": "<https://www.serverless.com/framework/docs/providers/aws/guide/packaging>",
    "anyOf": [
      {
        "type": "object",
        "title": "AwsPackageArtifact",
        "properties": {
          "artifact": {
            "description": "<https://www.serverless.com/framework/docs/providers/aws/guide/packaging#artifact>",
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      {
        "type": "object",
        "title": "AwsPackagePattern",
        "properties": {
          "excludeDevDependencies": {
            "description": "<https://www.serverless.com/framework/docs/providers/aws/guide/packaging#development-dependencies>",
            "type": "boolean",
            "default": true
          },
          "individually": {
            "description": "<https://www.serverless.com/framework/docs/providers/aws/guide/packaging#packaging-functions-separately>",
            "type": "boolean",
            "default": false
          },
          "patterns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      {
        "type": "object",
        "title": "AwsPackageExcludeInclude",
        "description": "@deprecated Please move to patterns as quickly as possible",
        "properties": {
          "excludeDevDependencies": {
            "description": "<https://www.serverless.com/framework/docs/providers/aws/guide/packaging#development-dependencies>",
            "type": "boolean",
            "default": true
          },
          "individually": {
            "description": "<https://www.serverless.com/framework/docs/providers/aws/guide/packaging#packaging-functions-separately>",
            "type": "boolean",
            "default": false
          },
          "exclude": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "include": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "additionalProperties": false
      }
    ]
  }
}
