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 "parameters" 59 ] 60 }, 61 "properties": { 62 "bundleName": { 63 "description": "Indicates the application bundle name for the target ability of the shortcut.", 64 "type": "string" 65 }, 66 "moduleName": { 67 "description": "Indicates the module name for the target ability of the shortcut.", 68 "type": "string" 69 }, 70 "abilityName": { 71 "description": "Indicates the class name for the target ability of the shortcut.", 72 "type": "string" 73 }, 74 "parameters": { 75 "description": "Indicates the parameters for the target ability of the shortcut.", 76 "type": "object", 77 "maxProperties": 1024, 78 "propertyNames": { 79 "pattern": "^[\\x00-\\x7F]+$", 80 "maxLength": 1024 81 }, 82 "additionalProperties": { 83 "type": "string", 84 "minLength": 0, 85 "maxLength": 1024, 86 "pattern": "^[\\x00-\\x7F]*$" 87 } 88 } 89 } 90 } 91 } 92 } 93 } 94 } 95 } 96}