From f35fbc3e2e67255be9e6cb99d77668e0b087d5ad Mon Sep 17 00:00:00 2001 From: longwei Date: Thu, 17 Mar 2022 21:44:08 +0800 Subject: [PATCH] fixed 794fca6 from https://gitee.com/a-carter-bear/developtools_packing_tool/pulls/118 fixed c16e405 from https://gitee.com/a-carter-bear/developtools_packing_tool/pulls/117 fix schema for module json Signed-off-by: longwei Change-Id: I10f88e9a163ed15ecd1e53ef4c4cbb0367ae84aa --- modulecheck/module.json | 95 ++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 29 deletions(-) diff --git a/modulecheck/module.json b/modulecheck/module.json index 39923206..2849bdad 100644 --- a/modulecheck/module.json +++ b/modulecheck/module.json @@ -15,34 +15,73 @@ "module": { "description": "Indicates the configuration of a .hap file. The module configuration is valid only for the current .hap file.", "type": "object", - "required": [ - "name", - "type", - "deviceTypes", - "deliveryWithInstall", - "pages" + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "har" + } + }, + "then": { + "propertyNames": { + "enum": [ + "name", + "type", + "srcEntrance", + "description", + "process", + "mainElement", + "deviceTypes", + "installationFree", + "virtualMachine", + "uiSyntax", + "metadata", + "abilities", + "extensionAbilities", + "requestPermissions", + "definePermissions" + ] + }, + "required": [ + "name", + "type", + "deviceTypes" + ] + } + }, + "else": { + "propertyNames": { + "enum": [ + "name", + "type", + "srcEntrance", + "description", + "process", + "mainElement", + "deviceTypes", + "deliveryWithInstall", + "installationFree", + "virtualMachine", + "uiSyntax", + "pages", + "metadata", + "abilities", + "extensionAbilities", + "requestPermissions", + "definePermissions" + ] + }, + "required": [ + "name", + "type", + "deviceTypes", + "deliveryWithInstall", + "pages" + ] + } + } ], - "propertyNames": { - "enum": [ - "name", - "type", - "srcEntrance", - "description", - "process", - "mainElement", - "deviceTypes", - "deliveryWithInstall", - "installationFree", - "virtualMachine", - "uiSyntax", - "pages", - "metadata", - "abilities", - "extensionAbilities", - "requestPermissions", - "definePermissions" - ] - }, "properties": { "name": { "description": "Indicates the module name.", @@ -89,9 +128,7 @@ "tablet", "tv", "wearable", - "liteWearable", "car", - "smartVision", "router" ] } -- Gitee