{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/azure-devops-extension-manifest-1.0.json",
  "definitions": {
    "Badge": {
      "description": "A link to external metadata badge.",
      "properties": {
        "href": {
          "description": "Link the user navigates to when selecting the badge.",
          "type": "string"
        },
        "uri": {
          "description": "The absolute URL of the badge image to be displayed.",
          "type": "string"
        },
        "description": {
          "description": "Description of the badge, to be displayed on hover.",
          "type": "string"
        }
      },
      "required": ["uri"],
      "title": "badge",
      "type": "object"
    },
    "Content": {
      "description": "A content file that describes the extension to users.",
      "properties": {
        "path": {
          "description": "The path to the file in the extension.",
          "type": "string"
        }
      },
      "required": ["path"],
      "title": "content",
      "type": "object"
    },
    "Contribution": {
      "description": "An individual contribution made by an extension",
      "properties": {
        "constraints": {
          "description": "List of constraints (filters) that should be applied to the availability of this contribution",
          "items": {
            "$ref": "#/definitions/ContributionConstraint"
          },
          "type": "array"
        },
        "description": {
          "description": "Description of the contribution/type",
          "type": "string"
        },
        "id": {
          "description": "Fully qualified identifier of the contribution/type",
          "type": "string"
        },
        "includes": {
          "description": "Includes is a set of contributions that should have this contribution included in their targets list.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "properties": {
          "description": "Properties/attributes of this contribution"
        },
        "restrictedTo": {
          "description": "List of demanded claims in order for the user to see this contribution (like anonymous, public, member...).",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "targets": {
          "description": "The ids of the contribution(s) that this contribution targets. (parent contributions)",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": {
          "description": "Id of the Contribution Type",
          "type": "string"
        },
        "visibleTo": {
          "description": "VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too.  Examples: \"ms\" - Means only the \"ms\" publisher can reference this. \"ms.vss-web\" - Means only the \"vss-web\" extension from the \"ms\" publisher can reference this.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": ["id", "targets", "type"],
      "title": "contribution",
      "type": "object"
    },
    "ContributionConstraint": {
      "description": "Specifies a constraint that can be used to dynamically include/exclude a given contribution",
      "properties": {
        "group": {
          "description": "An optional property that can be specified to group constraints together. All constraints within a group are AND'd together (all must be evaluate to True in order for the contribution to be included). Different groups of constraints are OR'd (only one group needs to evaluate to True for the contribution to be included).",
          "type": "number"
        },
        "id": {
          "description": "Fully qualified identifier of a shared constraint",
          "type": "string"
        },
        "inverse": {
          "description": "If true, negate the result of the filter (include the contribution if the applied filter returns false instead of true)",
          "type": "boolean"
        },
        "name": {
          "description": "Name of the IContributionFilter plugin",
          "type": "string"
        },
        "properties": {
          "description": "Properties that are fed to the contribution filter class"
        },
        "relationships": {
          "description": "Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will eliminate the contribution from the tree completely if the constraint is applied.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ContributionLicensingBehaviorType": {
      "description": "Represents different ways of including contributions based on licensing",
      "enum": [0, 1, 2],
      "type": "number"
    },
    "ContributionPropertyDescription": {
      "description": "Description about a property of a contribution type",
      "properties": {
        "description": {
          "description": "Description of the property",
          "type": "string"
        },
        "name": {
          "description": "Name of the property",
          "type": "string"
        },
        "required": {
          "description": "True if this property is required",
          "type": "boolean"
        },
        "type": {
          "$ref": "#/definitions/ContributionPropertyType",
          "description": "The type of value used for this property"
        }
      },
      "type": "object"
    },
    "ContributionPropertyType": {
      "description": "The type of value used for a property",
      "enum": [0, 1, 128, 16, 2, 256, 32, 4, 512, 64, 8],
      "type": "number"
    },
    "ContributionType": {
      "description": "A contribution type, given by a json schema",
      "properties": {
        "description": {
          "description": "Description of the contribution/type",
          "type": "string"
        },
        "id": {
          "description": "Fully qualified identifier of the contribution/type",
          "type": "string"
        },
        "indexed": {
          "description": "Controls whether or not contributions of this type have the type indexed for queries. This allows clients to find all extensions that have a contribution of this type.  NOTE: Only TrustedPartners are allowed to specify indexed contribution types.",
          "type": "boolean"
        },
        "name": {
          "description": "Friendly name of the contribution/type",
          "type": "string"
        },
        "properties": {
          "additionalProperties": {
            "$ref": "#/definitions/ContributionPropertyDescription"
          },
          "description": "Describes the allowed properties for this contribution type",
          "type": "object"
        },
        "visibleTo": {
          "description": "VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too.  Examples: \"ms\" - Means only the \"ms\" publisher can reference this. \"ms.vss-web\" - Means only the \"vss-web\" extension from the \"ms\" publisher can reference this.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ExtensionEventCallback": {
      "description": "Base class for an event callback for an extension",
      "properties": {
        "uri": {
          "description": "The uri of the endpoint that is hit when an event occurs",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ExtensionEventCallbackCollection": {
      "description": "Collection of event callbacks - endpoints called when particular extension events occur.",
      "properties": {
        "postDisable": {
          "$ref": "#/definitions/ExtensionEventCallback",
          "description": "Optional.  Defines an endpoint that gets called via a POST request to notify that an extension disable has occurred."
        },
        "postEnable": {
          "$ref": "#/definitions/ExtensionEventCallback",
          "description": "Optional.  Defines an endpoint that gets called via a POST request to notify that an extension enable has occurred."
        },
        "postInstall": {
          "$ref": "#/definitions/ExtensionEventCallback",
          "description": "Optional.  Defines an endpoint that gets called via a POST request to notify that an extension install has completed."
        },
        "postUninstall": {
          "$ref": "#/definitions/ExtensionEventCallback",
          "description": "Optional.  Defines an endpoint that gets called via a POST request to notify that an extension uninstall has occurred."
        },
        "postUpdate": {
          "$ref": "#/definitions/ExtensionEventCallback",
          "description": "Optional.  Defines an endpoint that gets called via a POST request to notify that an extension update has occurred."
        },
        "preInstall": {
          "$ref": "#/definitions/ExtensionEventCallback",
          "description": "Optional.  Defines an endpoint that gets called via a POST request to notify that an extension install is about to occur.  Response indicates whether to proceed or abort."
        },
        "versionCheck": {
          "$ref": "#/definitions/ExtensionEventCallback",
          "description": "For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used"
        }
      },
      "type": "object"
    },
    "ExtensionLicensing": {
      "description": "How an extension should handle including contributions based on licensing",
      "properties": {
        "overrides": {
          "description": "A list of contributions which deviate from the default licensing behavior",
          "items": {
            "$ref": "#/definitions/LicensingOverride"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "File": {
      "properties": {
        "path": {
          "description": "Path to resource on disk, which can be relative to your root directory.",
          "type": "string"
        },
        "addressable": {
          "description": "(optional) Set to true if you want your file to be URL-addressable. Defaults to false.",
          "type": "boolean"
        },
        "packagePath": {
          "description": "(optional) Path to the resource within the package. Defaults to the relative path on disk from your root directory.",
          "type": "string"
        },
        "contentType": {
          "description": "(optional) MIME type of the file. Defaults to a best guess based on the file extension and OS settings.",
          "type": "string"
        },
        "assetType": {
          "description": "(optional) Specify the value of the Type attribute of the asset entry in the VSIX manifest. Can also be an array of strings, in which case multiple asset entries get added for this file. Defaults to the packagePath.",
          "type": "string"
        },
        "lang": {
          "description": "(optional) Language of this asset. Localized files are served based on the Accept-Language header. Leave blank to signify this file is in the default (or fallback) language. Localized versions of the same file should have the same assetType.",
          "type": "string"
        }
      },
      "required": ["path"],
      "title": "file",
      "type": "object"
    },
    "LicensingOverride": {
      "description": "Maps a contribution to a licensing behavior",
      "properties": {
        "behavior": {
          "$ref": "#/definitions/ContributionLicensingBehaviorType",
          "description": "How the inclusion of this contribution should change based on licensing"
        },
        "id": {
          "description": "Fully qualified contribution id which we want to define licensing behavior for",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Link": {
      "properties": {
        "uri": {
          "description": "The absolute URL of the link.",
          "type": "string"
        }
      },
      "title": "link",
      "type": "object"
    },
    "Target": {
      "properties": {
        "id": {
          "type": "string",
          "enum": [
            "Microsoft.VisualStudio.Services",
            "Microsoft.TeamFoundation.Server",
            "Microsoft.VisualStudio.Services.Integration",
            "Microsoft.TeamFoundation.Server.Integration"
          ]
        }
      },
      "required": ["id"],
      "title": "target",
      "type": "object"
    }
  },
  "description": "Base class for extension properties which are shared by the extension manifest and the extension model",
  "properties": {
    "badges": {
      "description": "Array of links to external metadata badges like TravisCI, Appveyor, and so on, from the approved badges sites.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/Badge"
      }
    },
    "baseUri": {
      "description": "Uri used as base for other relative uri's defined in extension",
      "type": "string"
    },
    "branding": {
      "description": "Dictionary of brand-related properties.",
      "properties": {
        "color": {
          "description": "Primary color of the extension or publisher; can be a hex (#ff00ff), RGB (rgb(100,200,50)), or supported HTML color names (blue).",
          "type": "string"
        },
        "theme": {
          "description": "Complements the color; use dark for dark branding colors, or light for lighter branding colors.",
          "type": "string",
          "enum": ["dark", "light"]
        }
      },
      "title": "branding",
      "type": "object"
    },
    "categories": {
      "description": "Array of strings representing the categories your extension belongs to. At least one category must be provided and there's no limit to how many categories you may include. Valid values: Azure Repos, Azure Boards, Azure Pipelines, Azure Test Plans, and Azure Artifacts.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Azure Repos",
          "Azure Boards",
          "Azure Pipelines",
          "Azure Test Plans",
          "Azure Artifacts"
        ]
      },
      "minItems": 1
    },
    "constraints": {
      "description": "List of shared constraints defined by this extension",
      "items": {
        "$ref": "#/definitions/ContributionConstraint"
      },
      "type": "array"
    },
    "content": {
      "description": "Dictionary of content files that describe your extension to users.",
      "properties": {
        "details": {
          "$ref": "#/definitions/Content"
        }
      },
      "additionalProperties": {
        "$ref": "#/definitions/Content"
      },
      "title": "content",
      "type": "object"
    },
    "contributionTypes": {
      "description": "List of contribution types defined by this extension",
      "items": {
        "$ref": "#/definitions/ContributionType"
      },
      "type": "array"
    },
    "contributions": {
      "description": "List of contributions made by this extension",
      "items": {
        "$ref": "#/definitions/Contribution"
      },
      "type": "array"
    },
    "demands": {
      "description": "List of explicit demands required by this extension",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "description": {
      "description": "A few sentences describing the extensions. Limited to 200 characters.",
      "type": "string",
      "maxLength": 200
    },
    "eventCallbacks": {
      "$ref": "#/definitions/ExtensionEventCallbackCollection",
      "description": "Collection of endpoints that get called when particular extension events occur"
    },
    "fallbackBaseUri": {
      "description": "Secondary location that can be used as base for other relative uri's defined in extension",
      "type": "string"
    },
    "files": {
      "description": "The files section is where you reference any files you wish to include in your extension.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/File"
      }
    },
    "icons": {
      "description": "Dictionary of icons representing the extension.",
      "type": "object",
      "properties": {
        "default": {
          "description": "128x128 pixels",
          "type": "string"
        }
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "id": {
      "description": "The extension's identifier.",
      "type": "string"
    },
    "language": {
      "description": "Language Culture Name set by the Gallery",
      "type": "string"
    },
    "licensing": {
      "$ref": "#/definitions/ExtensionLicensing",
      "description": "How this extension behaves with respect to licensing"
    },
    "manifestVersion": {
      "description": "Version of the extension manifest format/content. Should be 1.",
      "type": "number"
    },
    "name": {
      "description": "A short, human-readable name of the extension. Limited to 200 characters.",
      "type": "string",
      "maxLength": 200
    },
    "links": {
      "description": "Dictionary of links that help users learn more about your extension, get support, and move.",
      "type": "object",
      "properties": {
        "getstarted": {
          "$ref": "#/definitions/Link"
        },
        "learn": {
          "$ref": "#/definitions/Link"
        },
        "license": {
          "$ref": "#/definitions/Link"
        },
        "privacypolicy": {
          "$ref": "#/definitions/Link"
        },
        "support": {
          "$ref": "#/definitions/Link"
        }
      },
      "additionalProperties": {
        "$ref": "#/definitions/Link"
      }
    },
    "publisher": {
      "description": "The identifier of the publisher. This identifier must match the identifier the extension is published under.",
      "type": "string"
    },
    "repository": {
      "description": "Dictionary of properties describing the source code repository for the extension.",
      "type": "object",
      "properties": {
        "type": {
          "description": "Type of repository. Example: git.",
          "type": "string"
        },
        "uri": {
          "description": "Absolute URL of the repository.",
          "type": "string"
        }
      }
    },
    "restrictedTo": {
      "description": "Default user claims applied to all contributions (except the ones which have been specified restrictedTo explicitly) to control the visibility of a contribution.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "scopes": {
      "description": "List of all oauth scopes required by this extension",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "screenshots": {
      "description": "Array of images that couldn't be included in your content.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/Content"
      }
    },
    "serviceInstanceType": {
      "description": "The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed",
      "type": "string"
    },
    "tags": {
      "description": "Array of string tags to help users find your extension.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "targets": {
      "description": "The products and services supported by your integration or extension.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/Target"
      },
      "minItems": 1
    },
    "version": {
      "description": "A string specifying the version of an extension. Should be in the format major.minor.patch.",
      "type": "string"
    }
  },
  "type": "object"
}
