From 616ada19caf072f5a931f232c558ea56ffd52a18 Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Sun, 20 Mar 2022 17:15:33 +0800 Subject: [PATCH] fixed 5676693 from https://gitee.com/houhaoyu/interface_sdk-js/pulls/1271 houhaoyu@huawei.com update syscap schema Signed-off-by: houhaoyu Change-Id: I7fc1c6e8fefa027edb522280c3f9470ccdf08eb8 --- api/syscapCheck/sysCapSchema.json | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/api/syscapCheck/sysCapSchema.json b/api/syscapCheck/sysCapSchema.json index b4c4d35971..586d6b250a 100644 --- a/api/syscapCheck/sysCapSchema.json +++ b/api/syscapCheck/sysCapSchema.json @@ -26,7 +26,7 @@ "properties": { "general": { "description": "core equipment", - "type":"array", + "type": "array", "items": { "type": "string", "enum": [ @@ -46,7 +46,18 @@ "description": "N equipment", "type":"array", "items": { - "type": "object" + "maxProperties": 1, + "minProperties": 1, + "type": "object", + "patternProperties": { + ".+": { + "type": "array", + "items": { + "type": "string", + "pattern": "^SystemCapability\\.[a-zA-Z0-9]+\\.[a-zA-Z0-9]+(\\.[a-zA-Z0-9]+)?$" + } + } + } } } } @@ -63,7 +74,8 @@ "addedSysCaps": { "type": "array", "items": { - "type": "string" + "type": "string", + "pattern": "^SystemCapability\\.[a-zA-Z0-9]+\\.[a-zA-Z0-9]+(\\.[a-zA-Z0-9]+)?$" } } } @@ -81,13 +93,15 @@ "addedSysCaps": { "type": "array", "items": { - "type": "string" + "type": "string", + "pattern": "^SystemCapability\\.[a-zA-Z0-9]+\\.[a-zA-Z0-9]+(\\.[a-zA-Z0-9]+)?$" } }, "removedSysCaps": { "type": "array", "items": { - "type": "string" + "type": "string", + "pattern": "^SystemCapability\\.[a-zA-Z0-9]+\\.[a-zA-Z0-9]+(\\.[a-zA-Z0-9]+)?$" } } } -- Gitee