{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "text": {
      "required": ["text"],
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "package": {
          "type": "string",
          "pattern": "^\\{?[0-9A-Fa-f]{8}[-]?([0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}\\}?$"
        },
        "id": {
          "type": "string"
        }
      }
    },
    "persistenceScope": {
      "type": "string",
      "description": "Determines if the user entered values should be persisted for the next template invocation.",
      "enum": ["none", "templateGroup", "shared"]
    },
    "overrideInfo": {
      "required": ["id"],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the symbol from the template.json."
        },
        "name": {
          "description": "Overrides the name specified in the template.json",
          "allOf": [
            {
              "$ref": "#/definitions/text"
            }
          ]
        },
        "description": {
          "description": "Overrides the name specified in the template.json",
          "allOf": [
            {
              "$ref": "#/definitions/text"
            }
          ]
        }
      }
    },
    "symbolInfo": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/definitions/overrideInfo"
        }
      ],
      "properties": {
        "isVisible": {
          "type": "boolean",
          "description": "Should be shown in the IDE. If not specified, defaults value is the value specified by defaultSymbolVisibility."
        },
        "invertBoolean": {
          "type": "boolean",
          "description": "If the referenced symbol should be shown in the IDE."
        },
        "defaultValue": {
          "type": "string",
          "description": "Overrides the default value specified for the "
        },
        "persistenceScope": {
          "description": "Determines if the user entered value should be persisted and used the next time a template is selected. Default value is the value specified by defaultSymbolVisibility Used starting in Visual Studio 2022 17.3",
          "allOf": [
            {
              "$ref": "#/definitions/persistenceScope"
            }
          ]
        },
        "persistenceScopeName": {
          "description": "Specifies the scope name of the persisted template option. To avoid conflicts with other templates, treat this like a namespace. Used starting in Visual Studio 2022 17.3",
          "type": "string"
        },
        "choices": {
          "description": "Specifies the name and description overrides for individual choice parameters",
          "type": "array",
          "items": {
            "allOf": [
              {
                "$ref": "#/definitions/overrideInfo"
              }
            ]
          }
        }
      }
    },
    "tags": {
      "type": "object",
      "required": ["type"],
      "properties": {
        "type": {
          "description": "The tag to modify",
          "type": "string",
          "enum": ["platform", "projectType"]
        },
        "add": {
          "description": "Tags to add",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "remove": {
          "description": "Tags to remove. * can be specified to remove all tags specified in template.json",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "unsupportedHost": {
      "type": "object",
      "required": ["id"],
      "properties": {
        "id": {
          "description": "The host identifier.",
          "type": "string",
          "enum": ["vs"]
        },
        "version": {
          "description": "A version range specifying the unsupported host versions. This uses the nuget package format."
        }
      }
    },
    "requiredComponent": {
      "type": "object",
      "required": ["hostId"],
      "description": "To require a particular host version specify the hostId and optionally version only. To require a particular SetupComponent or Extension, specify the ID and set the componentType appropriately. Version range is optional.",
      "properties": {
        "id": {
          "description": "The id of the component",
          "type": "string"
        },
        "hostId": {
          "description": "The host id that the component applies to",
          "type": "string",
          "enum": ["vs"]
        },
        "componentType": {
          "type": "string",
          "enum": ["setupComponent", "extension"]
        },
        "version": {
          "description": "A version range specifying the required version range. This uses the nuget package format."
        }
      }
    }
  },
  "id": "https://json.schemastore.org/ide.host.json",
  "properties": {
    "name": {
      "description": "Name of the template",
      "allOf": [
        {
          "$ref": "#/definitions/text"
        }
      ]
    },
    "description": {
      "description": "Description of the template",
      "allOf": [
        {
          "$ref": "#/definitions/text"
        }
      ]
    },
    "order": {
      "description": "The order of the template as shown in the New Project dialog",
      "type": "integer",
      "default": 0
    },
    "icon": {
      "description": "The relative file name of the icon to show in the New Project dialog",
      "type": "string"
    },
    "supportsDocker": {
      "description": "Determines if the checkbox for adding Docker support in the New Project dialog should be visible",
      "type": "boolean"
    },
    "disableHttpsSymbol": {
      "description": "The symbol in the template.json which when set, would cause the template to generate non-https ports and settings",
      "type": "string"
    },
    "defaultSymbolVisibility": {
      "description": "Sets the default isVisible for a symbolInfo if not explicitly specified. Controls if the parameter is displayed in the IDE. Defaults to false if not specified",
      "type": "boolean"
    },
    "defaultPersistenceScope": {
      "description": "The default value for a symbolInfo if not explicitly specified. Determines if the user entered value should be persisted and used the next time a template is selected. Used starting in Visual Studio 2022 17.3",
      "allOf": [
        {
          "$ref": "#/definitions/persistenceScope"
        }
      ]
    },
    "defaultPersistenceScopeName": {
      "description": "The default value for a symbolInfo if not explicitly specified. Specifies the scope name of the persisted template option. To avoid conflicts with other templates, treat this like a namespace. Used starting in Visual Studio 2022 17.3",
      "type": "string"
    },
    "symbolInfo": {
      "description": "Controls display characteristics of symbols declared in template.json",
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/definitions/symbolInfo"
          }
        ]
      }
    },
    "tags": {
      "description": "Modifigy the project and platform tags displayed in the IDE",
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/definitions/tags"
          }
        ]
      }
    },
    "unsupportedHosts": {
      "description": "Unsupported Hosts. This can be used to suppress the template from being displayed in the new project dialog in Visual Studio.",
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/definitions/unsupportedHost"
          }
        ]
      }
    },
    "requiredComponents": {
      "description": "Required components in order to display this template.",
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/definitions/requiredComponent"
          }
        ]
      }
    }
  },
  "title": "JSON schema for IDE template host files",
  "type": "object"
}
