{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://jsonschema.ntnyq.com/component.schema.json",
  "title": "JSON schema for weapp component config",
  "description": "Configuration Schema for weapp component config",
  "type": "object",
  "properties": {
    "addGlobalClass": {
      "type": "boolean",
      "description": "是否添加全局样式类"
    },
    "component": {
      "type": "boolean",
      "default": true,
      "const": true,
      "description": "自定义组件声明",
      "markdownDescription": "自定义组件声明\n\n[component](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component)"
    },
    "styleIsolation": {
      "type": "string",
      "description": "定义样式隔离选项",
      "default": "isolated",
      "enum": ["isolated", "apply-shared", "shared"]
    },
    "usingComponents": {
      "type": "object",
      "description": "声明当前自定义组件内引用的自定义组件",
      "markdownDescription": "声明当前自定义组件内引用的自定义组件\n\n[usingComponents](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component)",
      "patternProperties": {
        "^[a-z_-]+$": {
          "type": "string",
          "description": "自定义组件，名称只能是小写字母、中划线和下划线的组合，组件所在根目录名不能以 wx- 为前缀",
          "markdownDescription": "自定义组件，名称只能是小写字母、中划线和下划线的组合，组件所在根目录名不能以 `wx-` 为前缀\n\n[usingComponents](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component)",
          "pattern": "^(?!wx-).+"
        }
      },
      "additionalProperties": false
    },
    "virtualHost": {
      "type": "boolean",
      "description": "是否启用虚拟化宿主"
    }
  },
  "required": ["component"]
}
