diff --git a/BUILD.gn b/BUILD.gn index bba7d1bb65a25437262eecc16587649f8dd746c6..1c369a7f266be3f2258d49244a16c2ac4153a797 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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 } \ No newline at end of file diff --git a/id_defines.json b/id_defines.json new file mode 100644 index 0000000000000000000000000000000000000000..30e1531d252531daf8a73312e7fd2bb5075d974f --- /dev/null +++ b/id_defines.json @@ -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 + } + } + } +} \ No newline at end of file diff --git a/restool.gni b/restool.gni index 13476e1d99c8e3f9007814d87df033fd5062b8b6..f79c751f11756e0947d0c2f63352061e9b8997e4 100755 --- a/restool.gni +++ b/restool.gni @@ -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"