{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/mtaext/latest.json",
  "title": ".mtaext v3.3",
  "description": "MTA extension descriptor schema v3.3",
  "x-lintel": {
    "source": "https://www.schemastore.org/mtaext.json",
    "sourceSha256": "6599a78ecd97d627e6ce546e6c3c7b522f20076cf4abab5af11c69939a551e96",
    "fileMatch": [
      "*.mtaext"
    ]
  },
  "type": "object",
  "properties": {
    "_schema-version": {
      "description": "Used to indicate to an MTA processing tool (e.g. a deployer), which schema version was taken as the base when authoring a descriptor.",
      "type": "string",
      "pattern": "^[1-9]\\d*(\\.\\d+){0,2}$",
      "default": "3.3.0"
    },
    "ID": {
      "description": "A globally unique ID of this MTA extension descriptor. Unlimited string of unicode characters.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_\\-\\.]+$"
    },
    "extends": {
      "description": "A globally unique ID of the MTA or the MTA extension which shall be extended by this descriptor.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_\\-\\.]+$"
    },
    "description": {
      "description": "A non-translatable description of this MTA extension. This is not a text for application users.",
      "type": "string"
    },
    "provider": {
      "description": "The provider or vendor.",
      "type": "string"
    },
    "parameters": {
      "$ref": "#/$defs/parameters",
      "description": "Global parameters that will be added to the application."
    },
    "hooks": {
      "$ref": "#/$defs/hooks",
      "description": "A list of the existing hooks that will be modified by the extension."
    },
    "modules": {
      "description": "List of the existing modules that will be modified by the extension.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "The module name which must match an existing module defined by the deployment descriptor.",
            "type": "string",
            "pattern": "^[A-Za-z0-9_\\-\\.]+$"
          },
          "properties": {
            "description": "A collection of key-value pairs that are available to the module at runtime.",
            "type": "object"
          },
          "parameters": {
            "$ref": "https://catalog.lintel.tools/schemas/schemastore/mtaext/_shared/latest--mtad.json#/$defs/module-parameters",
            "description": "Configuration parameters that are used when deploying the module to the target runtime environment."
          },
          "hooks": {
            "$ref": "#/$defs/hooks",
            "description": "A list of the existing hooks that will be modified by the extension."
          },
          "requires": {
            "description": "List of the existing required dependencies that will be modified by the extension.",
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "description": "The dependency name which must match an existing required dependency defined by the deployment descriptor.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_\\-\\.]+$"
                },
                "properties": {
                  "description": "Required properties can be mapped from provided properties. Provided property values can be accessed by \"~{<provided-property-name>}\". Such expressions can be part of an arbitrary string",
                  "type": "object"
                },
                "parameters": {
                  "$ref": "#/$defs/module-requires",
                  "description": "Parameters can be used to influence the behavior of tools which interpret this descriptor. Parameters are not made available to the module at runtime. Provided property values can be accessed by \"~{<provided-property-name>}\". Such expressions can be part of an arbitrary string"
                }
              }
            }
          },
          "provides": {
            "description": "List of the existing provided dependencies that will be modified by the extension.",
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "description": "The dependency name which must match an existing provided dependency defined by the deployment descriptor.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_\\-\\.]+$"
                },
                "properties": {
                  "description": "Property names and values make up the configuration data which is to be provided to requiring modules at runtime",
                  "type": "object"
                },
                "parameters": {
                  "$ref": "#/$defs/module-provides",
                  "description": "Parameters can be used to influence the behavior of tools which interpret this descriptor. Parameters are not made available to the module at runtime. Provided property values can be accessed by \"~{<provided-property-name>}\". Such expressions can be part of an arbitrary string"
                }
              }
            }
          }
        }
      }
    },
    "resources": {
      "description": "List of the existing resources that will be modified by the extension.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "The resource name which must match an existing resource defined by the deployment descriptor.",
            "type": "string",
            "pattern": "^[A-Za-z0-9_\\-\\.]+$"
          },
          "active": {
            "description": "If a resource is declared to be active, it is allocated and bound according to declared requirements. Default value is true.",
            "type": "boolean"
          },
          "properties": {
            "description": "Property names and values make up the configuration data which is to be provided to requiring modules at runtime.",
            "type": "object"
          },
          "parameters": {
            "$ref": "#/$defs/resource-parameters",
            "description": "Parameters can be used to influence the behavior of tools which interpret this descriptor. Parameters are not made available to requiring modules at runtime. Untyped resources cannot have parameters."
          },
          "hooks": {
            "$ref": "#/$defs/hooks",
            "description": "List of existing hooks that will be modified by the extension."
          },
          "requires": {
            "description": "List of the existing required dependencies that will be modified by the extension.",
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "description": "The name of the existing required dependency that will be modified.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_\\-\\.]+$"
                },
                "properties": {
                  "description": "Required properties can be mapped from provided properties. Provided property values can be accessed by \"~{<provided-property-name>}\". Such expressions can be part of an arbitrary string",
                  "type": "object"
                },
                "parameters": {
                  "description": "Parameters can be used to influence the behavior of tools which interpret this descriptor. Parameters are not made available to the resource at runtime. Provided property values can be accessed by \"~{<provided-property-name>}\". Such expressions can be part of an arbitrary string",
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "module-types": {
      "description": "A list of existing module type definitions that will be modified by the extension.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "The name of the existing module type that will be modified.",
            "type": "string",
            "pattern": "^[A-Za-z0-9_\\-\\.]+$"
          },
          "properties": {
            "description": "A collection of key-value pairs that will be inherited by all modules of this type.",
            "type": "object"
          },
          "parameters": {
            "description": "Configuration parameters that will be inherited in all modules of this type.",
            "type": "object"
          }
        }
      }
    },
    "resource-types": {
      "description": "A list of existing resource type definitions that will be modified by the extension.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "The name of the existing resource type that will be modified.",
            "type": "string",
            "pattern": "^[A-Za-z0-9_\\-\\.]+$"
          },
          "properties": {
            "description": "A collection of key-value pairs that will be inherited by all modules of this type.",
            "type": "object"
          },
          "parameters": {
            "description": "Configuration parameters that will be inherited in all resources of this type.",
            "type": "object"
          }
        }
      }
    }
  },
  "required": [
    "_schema-version",
    "ID",
    "extends"
  ],
  "$defs": {
    "parameters": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/mtaext/_shared/latest--mtad.json#/properties/parameters"
    },
    "module-parameters": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/mtaext/_shared/latest--mtad.json#/$defs/module-parameters"
    },
    "module-requires-parameters": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/mtaext/_shared/latest--mtad.json#/$defs/module-requires-parameters"
    },
    "module-provides": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/mtaext/_shared/latest--mtad.json#/$defs/module-provides"
    },
    "module-requires": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/mtaext/_shared/latest--mtad.json#/$defs/module-requires"
    },
    "hooks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "The name of the existing hook that will be modified by this extension.",
            "type": "string",
            "pattern": "^[A-Za-z0-9_\\-\\.]+$"
          },
          "parameters": {
            "description": "Configuration parameters that are used when executing the hook to the target runtime environment.",
            "type": "object"
          },
          "requires": {
            "description": "List of the existing required dependencies that will be modified by this extension.",
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "description": "The name of the existing required dependencies that will be modified.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_\\-\\.]+$"
                },
                "parameters": {
                  "$ref": "#/$defs/hooks-parameters",
                  "description": "Parameters can be used to influence the behavior of tools which interpret this descriptor. Parameters are not made available to the hook at runtime. Provided property values can be accessed by \"~{<provided-property-name>}\". Such expressions can be part of an arbitrary string"
                }
              }
            }
          }
        }
      }
    },
    "hooks-parameters": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/mtaext/_shared/latest--mtad.json#/$defs/hooks-parameters"
    },
    "resource-parameters": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/mtaext/_shared/latest--mtad.json#/$defs/resource-parameters"
    }
  }
}
