• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "title": "JSON schema for shortcuts.json",
3  "$schema": "http://json-schema.org/draft-07/schema#",
4  "type": "object",
5  "additionalProperties": true,
6  "required": [
7    "shortcuts"
8  ],
9  "propertyNames": {
10    "enum": [
11      "shortcuts"
12    ]
13  },
14  "properties": {
15    "shortcuts": {
16      "description": "Indicates the shortcut information of the application. The value is an array, in which each element represents a shortcut object.",
17      "type": "array",
18      "items": {
19        "type": "object",
20        "propertyNames": {
21          "enum": [
22            "shortcutId",
23            "label",
24            "icon",
25            "wants"
26          ]
27        },
28        "required": [
29          "shortcutId"
30        ],
31        "properties": {
32          "shortcutId": {
33            "description": "Identifies a shortcut. The value is a string with a maximum of 63 bytes.",
34            "type": "string",
35            "maxLength": 63
36          },
37          "label": {
38            "description": "Indicates the label of the shortcut, that is, the text description displayed by the shortcut. The value can be a string or a resource index to description. A string can contain a maximum of 63 bytes. If the value exceeds 63 bytes, use the resource index.",
39            "type": "string",
40            "maxLength": 255,
41            "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$"
42          },
43          "icon": {
44            "description": "Indicates the icon of the shortcut. The value is the index to the resource file.",
45            "type": "string",
46            "pattern": "^[$]media:"
47          },
48          "wants": {
49            "description": "Indicates the wants to which the shortcut points. The attribute consists of the targetClass and targetBundle sub-attributes.",
50            "type": "array",
51            "items": {
52              "type": "object",
53              "propertyNames": {
54                "enum": [
55                  "bundleName",
56                  "moduleName",
57                  "abilityName"
58                ]
59              },
60              "properties": {
61                "bundleName": {
62                  "description": "Indicates the application bundle name for the target ability of the shortcut.",
63                  "type": "string"
64                },
65                "moduleName": {
66                  "description": "Indicates the module name for the target ability of the shortcut.",
67                  "type": "string"
68                },
69                "abilityName": {
70                  "description": "Indicates the class name for the target ability of the shortcut.",
71                  "type": "string"
72                }
73              }
74            }
75          }
76        }
77      }
78    }
79  }
80}