{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "profile": {
      "type": "object",
      "required": ["name"],
      "allOf": [
        {
          "$ref": "#/definitions/content"
        }
      ],
      "anyOf": [
        {
          "properties": {
            "executablePath": {
              "type": "string",
              "description": "An absolute path to the to the executable.",
              "default": "",
              "minLength": 1
            }
          },
          "not": {
            "required": ["commandName"]
          }
        },
        {
          "properties": {
            "commandName": {
              "type": "string",
              "description": "The name of the command to call.",
              "default": "",
              "minLength": 1
            }
          },
          "not": {
            "required": ["executablePath"]
          }
        }
      ]
    },
    "content": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the debug profile",
          "minLength": 1
        },
        "commandLineArgs": {
          "type": "string",
          "description": "The arguments to pass to the command.",
          "default": ""
        },
        "workingDirectory": {
          "type": "string",
          "description": "Sets the working directory of the command."
        },
        "launchBrowser": {
          "type": "boolean",
          "description": "Set to true if the browser should be launched.",
          "default": false
        },
        "launchUrl": {
          "type": "string",
          "description": "The relative URL to launch in the browser.",
          "format": "uri"
        },
        "environmentVariables": {
          "type": "object",
          "description": "Set the environment variables as key/value pairs.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "sdkVersion": {
          "type": "string",
          "description": "Sets the version of the SDK."
        }
      }
    }
  },
  "id": "https://json.schemastore.org/debugsettings.json",
  "properties": {
    "profiles": {
      "type": "array",
      "description": "A list of debug profiles",
      "items": {
        "$ref": "#/definitions/profile"
      }
    }
  },
  "title": "JSON schema for the ASP.NET DebugSettings.json files.",
  "type": "object"
}
