1{ 2 "title": "JSON schema for menu.json", 3 "$schema": "http://json-schema.org/draft-07/schema#", 4 "type": "object", 5 "additionalProperties": true, 6 "propertyNames": { 7 "enum": [ 8 "fileContextMenu" 9 ] 10 }, 11 "properties": { 12 "fileContextMenu": { 13 "description": "Indicates the name of the fileContextMenu.", 14 "type": "array", 15 "minItems": 1, 16 "maxItems": 5, 17 "uniqueItems": true, 18 "items": { 19 "type": "object", 20 "required": [ 21 "abilityName", 22 "menuItem", 23 "menuHandler", 24 "menuContext" 25 ], 26 "propertyNames": { 27 "enum": [ 28 "abilityName", 29 "menuItem", 30 "menuHandler", 31 "menuContext" 32 ] 33 }, 34 "properties": { 35 "abilityName": { 36 "description": "Indicates the name of the ability.", 37 "type": "string", 38 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]*$", 39 "maxLength": 255 40 }, 41 "menuItem": { 42 "description": "Indicates the name of the menuItem.", 43 "type": "string", 44 "maxLength": 255, 45 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 46 }, 47 "menuHandler": { 48 "description": "Indicates the name of the menuHandler.", 49 "type": "string", 50 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]*$", 51 "maxLength": 255 52 }, 53 "menuContext": { 54 "description": "Indicates the name of the menuContext.", 55 "type": "array", 56 "minItems": 1, 57 "uniqueItems": true, 58 "items": { 59 "type": "object", 60 "required": [ 61 "menuKind" 62 ], 63 "propertyNames": { 64 "enum": [ 65 "menuKind", 66 "menuRule", 67 "fileSupportType", 68 "fileNotSupportType" 69 ] 70 }, 71 "properties": { 72 "menuKind": { 73 "description": "Indicates the name of the menuKind.", 74 "type": "integer", 75 "enum": [ 76 0, 77 1, 78 2, 79 3 80 ] 81 }, 82 "menuRule": { 83 "description": "Indicates the name of the menuRule.", 84 "type": "string", 85 "enum": [ 86 "single", 87 "multi", 88 "both" 89 ] 90 }, 91 "fileSupportType": { 92 "description": "Indicates the name of the fileSupportType.", 93 "type": "array", 94 "maxItems": 100, 95 "items": { 96 "type": "string", 97 "pattern": "^\\.[a-zA-Z]+|\\*$", 98 "maxLength": 20 99 } 100 }, 101 "fileNotSupportType": { 102 "description": "Indicates the name of the fileNotSupportType.", 103 "type": "array", 104 "maxItems": 100, 105 "items": { 106 "type": "string", 107 "pattern": "^\\.[a-zA-Z]+$", 108 "maxLength": 20 109 } 110 } 111 } 112 } 113 } 114 } 115 } 116 } 117 } 118} 119