{
  "$id": "http://example.com/MTA/.mtaext",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "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": {
                  "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",
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "description": "MTA extension descriptor schema v3.3",
  "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": {
      "description": "Global parameters that will be added to the application.",
      "type": "object"
    },
    "hooks": {
      "description": "A list of the existing hooks that will be modified by the extension.",
      "$ref": "#/definitions/hooks"
    },
    "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": {
            "description": "Configuration parameters that are used when deploying the module to the target runtime environment.",
            "type": "object"
          },
          "hooks": {
            "description": "A list of the existing hooks that will be modified by the extension.",
            "$ref": "#/definitions/hooks"
          },
          "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": {
                  "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",
                  "type": "object"
                }
              }
            }
          },
          "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": {
                  "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",
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "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": {
            "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.",
            "type": "object"
          },
          "hooks": {
            "description": "List of existing hooks that will be modified by the extension.",
            "$ref": "#/definitions/hooks"
          },
          "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"],
  "title": ".mtaext v3.3",
  "type": "object"
}