!252 增加iddefinedSchema文件

Merge pull request !252 from HanSY/harSchema
This commit is contained in:
openharmony_ci
2025-08-22 14:03:41 +00:00
committed by Gitee
3 changed files with 51 additions and 0 deletions
+7
View File
@@ -116,4 +116,11 @@ ohos_prebuilt_etc("restool_faq") {
subsystem_name = "developtools"
part_name = "global_resource_tool"
install_enable = false
}
ohos_prebuilt_etc("restool_ids_schema") {
source = "${ids_schema_path}"
subsystem_name = "developtools"
part_name = "global_resource_tool"
install_enable = false
}
+43
View File
@@ -0,0 +1,43 @@
{
"title": "JSON schema for definedIds.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"record": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"media",
"profile",
"integer",
"string",
"strarray",
"intarray",
"color",
"plural",
"boolean",
"pattern",
"theme",
"float",
"symbol"
]
},
"name": {
"type": "string",
"minLength": 1
},
"id": {
"type": "string",
"pattern": "^0x(0[1-689a-fA-F][0-9a-fA-F]{6}|[1-9a-fA-F][0-9a-fA-F]{7})$"
}
},
"required": ["type", "name", "id"],
"additionalProperties": false
}
}
}
}
+1
View File
@@ -13,3 +13,4 @@
id_defined_path = "//base/global/system_resources/systemres/main/resources/base/element/id_defined.json"
restool_faq_path = "//developtools/global_resource_tool/restool_faq.json"
ids_schema_path = "//developtools/global_resource_tool/id_defines.json"