{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "jsBundle": {
      "properties": {
        "outputFileName": {
          "pattern": "\\.js$"
        },
        "sourceMap": {
          "description": "JavaScript only. Set to true to produce a source map.",
          "type": "boolean"
        },
        "sourceMapRootPath": {
          "description": "JavaScript only. Sets a root path for source maps.",
          "type": "string",
          "default": ""
        },
        "minify": {
          "type": "object",
          "properties": {
            "alwaysEscapeNonAscii": {
              "description": "JavaScript only. Gets or sets a flag indicating whether to always escape non-ASCII characters as \\uXXXX or to let the output encoding object handle that via the JsEncoderFallback object for the specified output encoding format.",
              "type": "boolean",
              "default": false
            },
            "evalTreatment": {
              "description": "JavaScript only.",
              "enum": ["ignore", "makeAllSafe", "makeImmediateSafe"],
              "default": "ignore"
            },
            "preserveImportantComments": {
              "description": "JavaScript only.",
              "type": "boolean",
              "default": true
            },
            "renameLocals": {
              "description": "JavaScript only. Controls if local variables should be shortened.",
              "type": "boolean",
              "default": true
            },
            "termSemicolons": {
              "description": "Forces all rules to be terminated with semicolons if set to true.",
              "type": "boolean",
              "default": true
            }
          },
          "allOf": [
            {
              "$ref": "#/definitions/ajaxminBaseSettings"
            }
          ]
        }
      }
    },
    "cssBundle": {
      "properties": {
        "outputFileName": {
          "pattern": "\\.css$"
        },
        "minify": {
          "type": "object",
          "properties": {
            "colorNames": {
              "description": "CSS only. If no color names are to be used, set this value to 'hex'. If a set of colors recognized by all major browser is okay to use (W3C-strict validation is not required), set this value to 'major'.",
              "enum": ["hex", "major", "noSwap", "strict"],
              "default": "strict"
            },
            "commentMode": {
              "description": "CSS only. How to treat comments in the code. The default is 'none', which will strip all comments except 'important' comments. 'all' will leave all comments, and 'hacks' will only leave certain known comment-based hacks.",
              "enum": ["none", "all", "hacks", "important"],
              "default": "important"
            },
            "adjustRelativePaths": {
              "description": "CSS only. Adjust relative paths inside the url() function.",
              "type": "boolean",
              "default": true
            },
            "termSemicolons": {
              "description": "Forces all rules to be terminated with semicolons if set to true.",
              "type": "boolean",
              "default": false
            }
          },
          "allOf": [
            {
              "$ref": "#/definitions/ajaxminBaseSettings"
            }
          ]
        }
      }
    },
    "htmlBundle": {
      "properties": {
        "outputFileName": {
          "pattern": "\\.(html|htm)$"
        },
        "minify": {
          "type": "object",
          "properties": {
            "collapseBooleanAttributes": {
              "description": "HTML only. Remove values from boolean attributes.",
              "type": "boolean",
              "default": true
            },
            "collapseWhitespace": {
              "description": "HTML only. Indicating whether to collapse whitespaces.",
              "type": "boolean",
              "default": true
            },
            "isFragmentOnly": {
              "description": "HTML only. Indicating whether the parsing is occurring on an HTML fragment, to avoid creating missing tags (like html, body, head).",
              "type": "boolean",
              "default": true
            },
            "keepOneSpaceWhenCollapsing": {
              "description": "HTML only. Indicating whether to keep one space when collapsing.",
              "type": "boolean",
              "default": false
            },
            "minifyEmbeddedCssCode": {
              "description": "HTML only. Minify CSS code in style tags.",
              "type": "boolean",
              "default": true
            },
            "minifyEmbeddedJsCode": {
              "description": "HTML only. Minify JS code in script tags.",
              "type": "boolean",
              "default": true
            },
            "minifyInlineCssCode": {
              "description": "HTML only. Minify CSS code in style attributes.",
              "type": "boolean",
              "default": true
            },
            "preserveCase": {
              "description": "HTML only. Preserve case of tag and attribute names.",
              "type": "boolean",
              "default": false
            },
            "removeHtmlComments": {
              "description": "HTML only. Remove all HTML comments except conditional, noindex, Knockout.js containerless comments and Angular.js comment directives.",
              "type": "boolean",
              "default": true
            },
            "removeOptionalEndTags": {
              "description": "HTML only. Remove optional end tags.",
              "type": "boolean",
              "default": false
            },
            "removeQuotedAttributes": {
              "description": "HTML only. Indicating whether to remove quoted attributes when possible.",
              "type": "boolean",
              "default": true
            }
          }
        }
      }
    },
    "ajaxminBaseSettings": {
      "properties": {
        "indentSize": {
          "description": "For the multi-line output feature, how many spaces to use when indenting a block (see outputMode).",
          "type": "integer",
          "default": 2
        },
        "outputMode": {
          "description": "SingleLine minifies everything to a single line. MultipleLines breaks the minified code into multiple lines for easier reading.",
          "enum": ["multipleLines", "singleLine", "none"],
          "default": "singleLine"
        }
      }
    },
    "bundle": {
      "required": ["outputFileName", "inputFiles"],
      "properties": {
        "includeInProject": {
          "description": "Set to true to include the output file in the project. Doesn't work in some Visual Studio project types like ASP.NET Core applications.",
          "type": "boolean",
          "default": true
        },
        "inputFiles": {
          "description": "One or more relative file names or globbing patterns to bundle. Example: \"scripts/**/*.js\"",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "minify": {
          "description": "Specify options for minification of the output file.",
          "type": "object",
          "required": ["enabled"],
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "gzip": {
              "description": "Produce a .gz file after minification.",
              "type": "boolean",
              "default": false
            }
          }
        },
        "outputFileName": {
          "description": "The relative path to the desired output file name.",
          "type": "string",
          "minLength": 1
        }
      },
      "oneOf": [
        {
          "$ref": "#/definitions/jsBundle"
        },
        {
          "$ref": "#/definitions/cssBundle"
        },
        {
          "$ref": "#/definitions/htmlBundle"
        }
      ]
    }
  },
  "description": "Schema for bundleconfig.json files",
  "id": "https://json.schemastore.org/bundleconfig.json",
  "items": {
    "$ref": "#/definitions/bundle"
  },
  "type": "array"
}
