From 7cf7fa18631d61173870f365539d623eb0aaf393 Mon Sep 17 00:00:00 2001 From: "zhangyafei.echo" Date: Wed, 14 May 2025 20:03:49 +0800 Subject: [PATCH] Description: add insight intent schema json. Sig:SIG_ApplicationFramework Feature or BugFix: Feature Binary Source: No Signed-off-by: zhangyafei.echo Change-Id: Idff6588833718219896bf7760db0670156fd76d3 --- modulecheck/BUILD.gn | 5 + modulecheck/insightIntent.json | 26 +++- modulecheck/insightIntentInner.json | 221 ++++++++++++++++++++++++++++ 3 files changed, 247 insertions(+), 5 deletions(-) create mode 100644 modulecheck/insightIntentInner.json diff --git a/modulecheck/BUILD.gn b/modulecheck/BUILD.gn index 43b08a5e..cfaf3153 100644 --- a/modulecheck/BUILD.gn +++ b/modulecheck/BUILD.gn @@ -92,3 +92,8 @@ ohos_prebuilt_etc("startWindowSchema_json") { source = "startWindow.json" install_enable = false } + +ohos_prebuilt_etc("insightIntentInnerSchema_json") { + source = "insightIntentInner.json" + install_enable = false +} diff --git a/modulecheck/insightIntent.json b/modulecheck/insightIntent.json index 11bf8489..b99a2a91 100644 --- a/modulecheck/insightIntent.json +++ b/modulecheck/insightIntent.json @@ -3,12 +3,11 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, - "required": [ - "insightIntents" - ], + "required": [], "propertyNames": { "enum": [ - "insightIntents" + "insightIntents", + "insightIntentsSrcEntry" ] }, "properties": { @@ -199,6 +198,23 @@ } } } + }, + "insightIntentsSrcEntry": { + "description": "Indicates the srcEntry of insightIntents.", + "type": "array", + "items": { + "type": "object", + "required": [ + "srcEntry" + ], + "properties": { + "srcEntry": { + "description": "Indicates the js code path corresponding to the insight intent entry executor.", + "type": "string", + "maxLength": 127 + } + } + } } } -} \ No newline at end of file +} diff --git a/modulecheck/insightIntentInner.json b/modulecheck/insightIntentInner.json new file mode 100644 index 00000000..6436cc92 --- /dev/null +++ b/modulecheck/insightIntentInner.json @@ -0,0 +1,221 @@ +{ + "title": "JSON schema for insight_intent.json for HAR packages", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "required": [], + "propertyNames": { + "enum": [ + "insightIntents", + "insightIntentsSrcEntry" + ] + }, + "properties": { + "insightIntents": { + "description": "Indicates the configuration of insightIntents.", + "deprecationMessage": "insightIntents can't be used in HAR packages, but there's no restriction early. It didn't take effect even was configured, so marked deprecated and no substitute field.", + "type": "array", + "minItems": 1, + "maxItems": 128, + "uniqueItems": true, + "items": { + "type": "object", + "propertyNames": { + "enum": [ + "intentName", + "domain", + "intentVersion", + "srcEntry", + "uiAbility", + "serviceExtension", + "uiExtension", + "form", + "displayName", + "displayDescription", + "icon", + "keywords", + "inputParams", + "outputParams", + "entities" + ] + }, + "required": [ + "intentName", + "domain", + "intentVersion", + "srcEntry" + ], + "properties": { + "intentName": { + "description": "Indicates the name of insightIntent.It's also the intent interface to implement.", + "type": "string", + "pattern": "^[A-Z][a-zA-Z0-9]+$" + }, + "domain": { + "description": "Indicates the domain of insightIntent.", + "type": "string" + }, + "intentVersion": { + "description": "Indicates the version of insightIntent.", + "type": "string", + "pattern": "^(\\d+\\.){2}\\d+$" + }, + "srcEntry": { + "description": "Indicates the js code path corresponding to the ability.", + "type": "string", + "maxLength": 127 + }, + "uiAbility": { + "type": "object", + "propertyNames": { + "enum": [ + "ability", + "executeMode" + ] + }, + "required": [ + "ability", + "executeMode" + ], + "properties": { + "ability": { + "description": "Indicates the name of the ability.", + "type": "string", + "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$", + "maxLength": 127 + }, + "executeMode": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "background", + "foreground" + ] + } + } + } + }, + "serviceExtension": { + "type": "object", + "propertyNames": { + "enum": [ + "ability" + ] + }, + "required": [ + "ability" + ], + "properties": { + "ability": { + "description": "Indicates the name of the ability.", + "type": "string", + "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$", + "maxLength": 127 + } + } + }, + "uiExtension": { + "type": "object", + "propertyNames": { + "enum": [ + "ability" + ] + }, + "required": [ + "ability" + ], + "properties": { + "ability": { + "description": "Indicates the name of the ability.", + "type": "string", + "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$", + "maxLength": 127 + } + } + }, + "form": { + "type": "object", + "propertyNames": { + "enum": [ + "ability", + "formName" + ] + }, + "required": [ + "ability", + "formName" + ], + "properties": { + "ability": { + "description": "Indicates the name of the ability.", + "type": "string", + "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$", + "maxLength": 127 + }, + "formName": { + "description": "Indicates the name of the form class. The tag value is a string of up to 127 bytes. The tag cannot be default.", + "type": "string", + "maxLength": 127 + } + } + }, + "displayName": { + "description": "Indicates the display name of insightIntent.", + "type": "string" + }, + "displayDescription": { + "description": "Indicates the display description of insightIntent.", + "type": "string" + }, + "icon": { + "description": "Indicates the display icon of insightIntent.", + "type": "string" + }, + "keywords": { + "description": "Indicates the keywords of insightIntent.", + "type": "array", + "items": { + "type": "string" + } + }, + "inputParams": { + "description": "Indicates the input params of insightIntent.", + "type": "array", + "items": { + "type": "object" + } + }, + "outputParams": { + "description": "Indicates the output params of insightIntent.", + "type": "array", + "items": { + "type": "object" + } + }, + "entities": { + "description": "Indicates the entities of insightIntent.", + "type": "object" + } + } + } + }, + "insightIntentsSrcEntry": { + "description": "Indicates the srcEntry of insightIntents.", + "type": "array", + "items": { + "type": "object", + "required": [ + "srcEntry" + ], + "properties": { + "srcEntry": { + "description": "Indicates the js code path corresponding to the insight intent entry executor.", + "type": "string", + "maxLength": 127 + } + } + } + } + } +} -- Gitee