{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "https://json.schemastore.org/vsix-publish.json",
  "properties": {
    "identity": {
      "type": "object",
      "required": ["internalName"],
      "properties": {
        "description": {
          "type": "string",
          "title": "Description",
          "description": "A description for the extension. Required if the extension is not a VSIX.",
          "minLength": 1,
          "maxLength": 280
        },
        "displayName": {
          "type": "string",
          "title": "DisplayName",
          "description": "A display name for the extension. Required if the extension is not a VSIX.",
          "minLength": 1,
          "maxLength": 80
        },
        "icon": {
          "type": "string",
          "title": "Icon",
          "description": "An icon for the extension. Required if the extension is not a VSIX. Can be relative to the current json file's directory.",
          "minLength": 1
        },
        "installTargets": {
          "type": "array",
          "title": "InstallTargets",
          "description": "A list of install targets for the extension. At least one is required if the extension is not a VSIX.",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "title": "InstallTarget",
            "description": "An installation target for the extension.",
            "type": "object",
            "required": ["sku", "version"],
            "properties": {
              "sku": {
                "type": "string",
                "title": "Install target SKU",
                "description": "The SKU name of the installation target.",
                "enum": [
                  "Microsoft.VisualStudio.Community",
                  "Microsoft.VisualStudio.Enterprise",
                  "Microsoft.VisualStudio.Express_All",
                  "Microsoft.VisualStudio.IntegratedShell",
                  "Microsoft.VisualStudio.Pro",
                  "Microsoft.VisualStudio.TestProfessional",
                  "Microsoft.VisualStudio.Ultimate",
                  "Microsoft.VisualStudio.Premium",
                  "Microsoft.VisualStudio.VBExpress",
                  "Microsoft.VisualStudio.VCExpress",
                  "Microsoft.VisualStudio.VCSExpress",
                  "Microsoft.VisualStudio.VPDExpress",
                  "Microsoft.VisualStudio.VSLS",
                  "Microsoft.VisualStudio.VSWinExpress",
                  "Microsoft.VisualStudio.VSWinDesktopExpress",
                  "Microsoft.VisualStudio.VWDExpress"
                ]
              },
              "version": {
                "type": "string",
                "title": "Install target version range",
                "description": "The version range of the install target that the extension can be installed to.",
                "pattern": "^[0-9\\[\\(,. \\)\\]]+$"
              }
            }
          }
        },
        "internalName": {
          "type": "string",
          "title": "Internal name",
          "description": "The internal name of the extension. A marketplace extension is identified as 'publisherName'.'internalName'. Cannot contain spaces.",
          "minLength": 1,
          "maxLength": 63,
          "pattern": "^[^\\s-]+$"
        },
        "language": {
          "type": ["string", "number"],
          "title": "Language",
          "description": "The default language the extension applies to. Must be a CLR locale code or an lcid code.",
          "pattern": "^(\\d{4})$|^([a-zA-Z]{2}(-[A-Za-z]{2})?)$|^neutral$"
        },
        "tags": {
          "type": "array",
          "title": "Tags",
          "description": "A list of tags for the extension.",
          "items": {
            "type": "string",
            "title": "Tag",
            "description": "A tag for the extension.",
            "minLength": 1,
            "maxLength": 50
          }
        },
        "version": {
          "type": "string",
          "title": "Version",
          "description": "The version of the extension. Required if the extension is not a VSIX.",
          "pattern": "^([0-9]+\\.){1,3}([0-9]+)$"
        },
        "vsixId": {
          "type": "string",
          "title": "VsixId",
          "description": "The vsix identifier of the extension.",
          "minLength": 1
        }
      }
    },
    "assetFiles": {
      "type": "array",
      "title": "AssetFiles",
      "description": "A list of assets to include in the package sent to the marketplace.",
      "items": {
        "type": "object",
        "required": ["pathOnDisk", "targetPath"],
        "properties": {
          "pathOnDisk": {
            "type": "string",
            "title": "PathOnDisk",
            "description": "A path to the file to include in the package. Can be relative to the current json file's directory.",
            "minLength": 1
          },
          "targetPath": {
            "type": "string",
            "title": "TargetPath",
            "description": "The path to embed the file in the package. This can be referenced from your overview file via an image link, for example",
            "default": ""
          }
        }
      }
    },
    "categories": {
      "type": "array",
      "title": "Categories",
      "description": "A list of categories that the extension applies to.",
      "minItems": 1,
      "maxItems": 3,
      "uniqueItems": true,
      "items": {
        "anyOf": [
          {
            "type": "string",
            "title": "Category",
            "description": "A valid category on the marketplace that the extension applies to.",
            "minLength": 1
          },
          {
            "enum": [
              "ajax",
              "build",
              "coding",
              "connected services",
              "data",
              "database",
              "documentation",
              "extension sdk",
              "framework and libraries",
              "lightswitch",
              "lightswitch controls",
              "lightswitch templates",
              "modelling",
              "office",
              "other",
              "other templates",
              "performance",
              "process templates",
              "programming languages",
              "reporting",
              "scaffolding",
              "security",
              "services",
              "setup and deployment",
              "sharepoint",
              "sharepoint controls",
              "sharepoint templates",
              "silverlight controls",
              "source control",
              "start pages",
              "team development",
              "testing",
              "visual studio extensions",
              "wcf",
              "web",
              "windows forms templates",
              "windows forms controls",
              "workflow",
              "wpf templates",
              "wpf controls",
              "xna"
            ]
          }
        ]
      }
    },
    "overview": {
      "type": "string",
      "title": "Overview",
      "description": "A path to a markdown file that will be displayed on the extension's page in the marketplace. The path can be relative to the current json file's path.",
      "minLength": 1
    },
    "priceCategory": {
      "type": "string",
      "title": "PriceCategory",
      "description": "The pricing model for the extension.",
      "default": "free",
      "enum": ["free", "trial", "paid"]
    },
    "publisher": {
      "type": "string",
      "title": "Publisher",
      "description": "The publisher of the extension. Must not be a display name of the publisher.",
      "minLength": 1
    },
    "private": {
      "type": "boolean",
      "title": "Private",
      "description": "If true, the extension will be uploaded as a private extension.",
      "default": false
    },
    "qna": {
      "type": "boolean",
      "title": "Q&A",
      "description": "If true, the extension will have a Q&A page on the marketplace.",
      "default": true
    },
    "repo": {
      "type": "string",
      "title": "Repo",
      "description": "A URL that points to the GitHub repo for the extension.",
      "format": "uri"
    }
  },
  "required": ["categories", "identity", "overview", "publisher"],
  "type": "object"
}
