1{ 2 "title": "JSON schema for module.json", 3 "$schema": "http://json-schema.org/draft-07/schema#", 4 "type": "object", 5 "additionalProperties": true, 6 "required": [ 7 "module" 8 ], 9 "propertyNames": { 10 "enum": [ 11 "module" 12 ] 13 }, 14 "properties": { 15 "module": { 16 "description": "Indicates the configuration of a .hap file. The module configuration is valid only for the current .hap file.", 17 "type": "object", 18 "allOf": [ 19 { 20 "if": { 21 "properties": { 22 "type": { 23 "const": "shared" 24 } 25 } 26 }, 27 "then": { 28 "propertyNames": { 29 "enum": [ 30 "name", 31 "type", 32 "description", 33 "deliveryWithInstall", 34 "deviceTypes", 35 "pages", 36 "metadata", 37 "requestPermissions", 38 "dependencies", 39 "libIsolation", 40 "installationFree", 41 "atomicService" 42 ] 43 }, 44 "required": [ 45 "name", 46 "type", 47 "deliveryWithInstall", 48 "deviceTypes" 49 ] 50 } 51 }, 52 { 53 "if": { 54 "properties": { 55 "type": { 56 "const": "har" 57 } 58 } 59 }, 60 "then": { 61 "propertyNames": { 62 "enum": [ 63 "name", 64 "type", 65 "srcEntrance", 66 "srcEntry", 67 "description", 68 "process", 69 "mainElement", 70 "deviceTypes", 71 "installationFree", 72 "virtualMachine", 73 "uiSyntax", 74 "metadata", 75 "abilities", 76 "extensionAbilities", 77 "requestPermissions", 78 "definePermissions", 79 "testRunner", 80 "dependencies", 81 "libIsolation" 82 ] 83 }, 84 "required": [ 85 "name", 86 "type", 87 "deviceTypes" 88 ] 89 } 90 }, 91 { 92 "if": { 93 "properties": { 94 "type": { 95 "const": "entry" 96 } 97 } 98 }, 99 "then": { 100 "propertyNames": { 101 "enum": [ 102 "name", 103 "type", 104 "srcEntrance", 105 "srcEntry", 106 "description", 107 "process", 108 "mainElement", 109 "deviceTypes", 110 "deliveryWithInstall", 111 "installationFree", 112 "virtualMachine", 113 "uiSyntax", 114 "pages", 115 "metadata", 116 "abilities", 117 "extensionAbilities", 118 "requestPermissions", 119 "definePermissions", 120 "testRunner", 121 "dependencies", 122 "libIsolation", 123 "atomicService" 124 ] 125 }, 126 "required": [ 127 "name", 128 "type", 129 "deviceTypes", 130 "deliveryWithInstall", 131 "pages" 132 ] 133 } 134 }, 135 { 136 "if": { 137 "properties": { 138 "type": { 139 "const": "feature" 140 } 141 } 142 }, 143 "then": { 144 "propertyNames": { 145 "enum": [ 146 "name", 147 "type", 148 "srcEntrance", 149 "srcEntry", 150 "description", 151 "process", 152 "mainElement", 153 "deviceTypes", 154 "deliveryWithInstall", 155 "installationFree", 156 "virtualMachine", 157 "uiSyntax", 158 "pages", 159 "metadata", 160 "abilities", 161 "extensionAbilities", 162 "requestPermissions", 163 "definePermissions", 164 "testRunner", 165 "dependencies", 166 "libIsolation", 167 "atomicService" 168 ] 169 }, 170 "required": [ 171 "name", 172 "type", 173 "deviceTypes", 174 "deliveryWithInstall", 175 "pages" 176 ] 177 } 178 } 179 ], 180 "properties": { 181 "name": { 182 "description": "Indicates the module name.", 183 "type": "string", 184 "pattern": "[^\u4e00-\u9fa5]+", 185 "maxLength": 31 186 }, 187 "type": { 188 "description": "Indicates the type of the module.", 189 "type": "string", 190 "enum": [ 191 "entry", 192 "feature", 193 "har", 194 "shared" 195 ] 196 }, 197 "srcEntrance": { 198 "description": "This tag indicates the entry js code path corresponding to hap", 199 "type": "string", 200 "deprecationMessage": "Deprecated since api 9, use srcEntry instead.", 201 "maxLength": 127 202 }, 203 "srcEntry": { 204 "description": "This tag indicates the entry js code path corresponding to hap", 205 "type": "string", 206 "maxLength": 127 207 }, 208 "description": { 209 "description": "Indicates the description of the current .hap file.", 210 "type": "string", 211 "maxLength": 255 212 }, 213 "process": { 214 "description": "Indicates the name of the process running the module.", 215 "type": "string", 216 "maxLength": 31 217 }, 218 "mainElement": { 219 "description": "Describes hap entry ability name or extension name.", 220 "type": "string", 221 "maxLength": 255 222 }, 223 "deviceTypes": { 224 "description": "Indicates the type of devices on which the abilities can run.This label cannot be left blank.", 225 "type": "array", 226 "uniqueItems": true, 227 "items": { 228 "type": "string", 229 "enum": [ 230 "default", 231 "tablet", 232 "tv", 233 "wearable", 234 "car" 235 ] 236 } 237 }, 238 "deliveryWithInstall": { 239 "description": "Specifies whether the .hap file is installed when the user installs the application.true: The .hap file is installed during the application installation.false: The .hap file is not installed during the application installation.This label cannot be left blank.", 240 "type": "boolean" 241 }, 242 "installationFree": { 243 "description": "Indicates whether free installation of the current hap is supported.If installationFree is true, this module is a service.OtherWise, this module is an application", 244 "type": "boolean" 245 }, 246 "virtualMachine": { 247 "description": "Identify the type of target virtual machine currently running hap.", 248 "type": "string", 249 "enum": [ 250 "ark", 251 "default" 252 ], 253 "default": "default" 254 }, 255 "uiSyntax": { 256 "description": "Indicates the syntax type of JS Component.Default is hml.", 257 "deprecationMessage": "Deprecated since api 9", 258 "type": "string", 259 "enum": [ 260 "ets", 261 "hml" 262 ], 263 "default": "hml" 264 }, 265 "pages": { 266 "description": "Used to list the information of each page in JS Component.", 267 "type": "string", 268 "pattern": "^[$]profile:[0-9a-zA-Z_.]+$", 269 "maxLength": 255 270 }, 271 "metadata": { 272 "description": "Indicates the metadata of the module.", 273 "type": "array", 274 "items": { 275 "type": "object", 276 "propertyNames": { 277 "enum": [ 278 "name", 279 "value", 280 "resource" 281 ] 282 }, 283 "properties": { 284 "name": { 285 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 286 "type": "string", 287 "maxLength": 255 288 }, 289 "value": { 290 "description": "Indicates the value of a data element. The value is a string with a maximum of 255 bytes.", 291 "type": "string", 292 "maxLength": 255 293 }, 294 "resource": { 295 "description": "Indicates the resource of a data element.", 296 "type": "string", 297 "pattern": "^[$]profile:[0-9a-zA-Z_.]+$", 298 "maxLength": 255 299 } 300 } 301 } 302 }, 303 "abilities": { 304 "description": "Indicates all abilities in the current module. The value is an array of objects, each of which represents an ability.This label can be left blank by default,and indicates no capability exists in the current module.", 305 "type": "array", 306 "items": { 307 "type": "object", 308 "oneOf": [ 309 { 310 "required": [ 311 "name", 312 "srcEntrance", 313 "startWindowIcon", 314 "startWindowBackground" 315 ] 316 }, 317 { 318 "required": [ 319 "name", 320 "srcEntry", 321 "startWindowIcon", 322 "startWindowBackground" 323 ] 324 } 325 ], 326 "propertyNames": { 327 "enum": [ 328 "priority", 329 "name", 330 "srcEntrance", 331 "srcEntry", 332 "launchType", 333 "description", 334 "icon", 335 "label", 336 "permissions", 337 "metadata", 338 "visible", 339 "exported", 340 "skills", 341 "backgroundModes", 342 "continuable", 343 "startWindowIcon", 344 "startWindowBackground", 345 "removeMissionAfterTerminate", 346 "orientation", 347 "supportWindowMode", 348 "maxWindowRatio", 349 "minWindowRatio", 350 "maxWindowWidth", 351 "minWindowWidth", 352 "maxWindowHeight", 353 "minWindowHeight", 354 "excludeFromMissions" 355 ] 356 }, 357 "properties": { 358 "priority": { 359 "description": "Indicates the priority of the ability.Only for system application.This field is used for implicit query.Range from 0 to 10, default value is 0.", 360 "type": "integer", 361 "minimum": 0, 362 "maximum": 10 363 }, 364 "name": { 365 "description": "Indicates the name of the ability.", 366 "type": "string", 367 "pattern": "[^\u4e00-\u9fa5]+", 368 "maxLength": 127 369 }, 370 "srcEntrance": { 371 "description": "Indicates the js code path corresponding to the ability.", 372 "type": "string", 373 "deprecationMessage": "Deprecated since api 9, use srcEntry instead.", 374 "maxLength": 127 375 }, 376 "srcEntry": { 377 "description": "Indicates the js code path corresponding to the ability.", 378 "type": "string", 379 "maxLength": 127 380 }, 381 "launchType": { 382 "description": "Indicates the boot mode of ability.", 383 "type": "string", 384 "enum": [ 385 "standard", 386 "singleton", 387 "specified", 388 "multiton" 389 ], 390 "default": "singleton" 391 }, 392 "description": { 393 "description": "Describes the ability.", 394 "type": "string", 395 "maxLength": 255 396 }, 397 "icon": { 398 "description": "Indicates the index to the ability icon file, in the format of \"$media:ability_icon\".This label can be left blank by default.", 399 "type": "string", 400 "pattern": "^[$]media:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 401 }, 402 "label": { 403 "description": "Indicates the ability name visible to users. The tag value is set to the resource index of this name to support multiple languages.", 404 "type": "string", 405 "maxLength": 255, 406 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 407 }, 408 "permissions": { 409 "description": "Indicates the permissions required for abilities of another application to call the current ability, generally in the format of a reverse domain name. The value can be either the permissions predefined in the OS or those customized by your application. If a custom permission is used, the value must be the same as the name value of a specific permission defined in the definePermissions attribute.", 410 "type": "array", 411 "uniqueItems": true, 412 "items": { 413 "type": "string", 414 "maxLength": 255 415 } 416 }, 417 "metadata": { 418 "description": "Indicates the metadata of the ability.", 419 "type": "array", 420 "items": { 421 "type": "object", 422 "propertyNames": { 423 "enum": [ 424 "name", 425 "value", 426 "resource" 427 ] 428 }, 429 "properties": { 430 "name": { 431 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 432 "type": "string", 433 "maxLength": 255 434 }, 435 "value": { 436 "description": "Indicates the value of a data element. The value is a string with a maximum of 255 bytes.", 437 "type": "string", 438 "maxLength": 255 439 }, 440 "resource": { 441 "description": "Indicates the resource of a data element.", 442 "type": "string", 443 "pattern": "^[$]profile:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 444 "maxLength": 255 445 } 446 } 447 } 448 }, 449 "visible": { 450 "description": "Specifies whether the ability can be called by other applications.The \"true\" indicates the ability can be called by other applications.The \"false\" indicates the ability cannot be called by other applications.This tag is optional. The default value is false.", 451 "type": "boolean", 452 "deprecationMessage": "Deprecated since api 9, use exported instead.", 453 "default": false 454 }, 455 "exported": { 456 "description": "Specifies whether the ability can be called by other applications.The \"true\" indicates the ability can be called by other applications.The \"false\" indicates the ability cannot be called by other applications.This tag is optional. The default value is false.", 457 "type": "boolean", 458 "default": false 459 }, 460 "skills": { 461 "description": "Indicates the types of the intent that can be accepted by the ability.", 462 "type": "array", 463 "items": { 464 "type": "object", 465 "uniqueItems": true, 466 "propertyNames": { 467 "enum": [ 468 "actions", 469 "entities", 470 "uris" 471 ] 472 }, 473 "properties": { 474 "actions": { 475 "description": "Indicates the actions of the intent that can be accepted by the ability. The value can have one or multiple actions predefined in the system.", 476 "type": "array", 477 "uniqueItems": true, 478 "items": { 479 "type": "string" 480 } 481 }, 482 "entities": { 483 "description": "Indicates the entities of the intent that can be accepted by the ability, such as video and Home application. The value can have one or multiple entities either predefined in the system or be customized.", 484 "type": "array", 485 "items": { 486 "type": "string" 487 }, 488 "uniqueItems": true 489 }, 490 "uris": { 491 "description": "This tag identifies the collection of data specifications to be added to the Intent filter.", 492 "type": "array", 493 "items": { 494 "anyOf": [ 495 { 496 "type": "object", 497 "propertyNames": { 498 "enum": [ 499 "scheme", 500 "host", 501 "port", 502 "pathStartWith", 503 "path", 504 "pathRegex", 505 "type" 506 ] 507 }, 508 "required": [ 509 "scheme" 510 ], 511 "properties": { 512 "scheme": { 513 "description": "This label is a string type.", 514 "type": "string" 515 }, 516 "host": { 517 "description": "This label is a string type.", 518 "type": "string" 519 }, 520 "port": { 521 "description": "This label is a string type.", 522 "type": "string" 523 }, 524 "pathStartWith": { 525 "description": "This label is a string type.", 526 "type": "string" 527 }, 528 "path": { 529 "description": "This label is a string type.", 530 "type": "string" 531 }, 532 "pathRegex": { 533 "description": "This label is a string type.", 534 "type": "string" 535 }, 536 "type": { 537 "description": "This label is a string type.", 538 "type": "string" 539 } 540 } 541 }, 542 { 543 "type": "object", 544 "propertyNames": { 545 "enum": [ 546 "type" 547 ] 548 }, 549 "properties": { 550 "type": { 551 "description": "This label is a string type.", 552 "type": "string" 553 } 554 } 555 } 556 ] 557 } 558 } 559 } 560 } 561 }, 562 "backgroundModes": { 563 "description": "Indicates the background service addressing a specific usage scenario. This attribute is dedicated to the abilities using the Service template. You can assign multiple background service types to a specific ability using the Service template.", 564 "type": "array", 565 "uniqueItems": true, 566 "items": { 567 "type": "string", 568 "enum": [ 569 "dataTransfer", 570 "audioPlayback", 571 "audioRecording", 572 "location", 573 "bluetoothInteraction", 574 "multiDeviceConnection", 575 "wifiInteraction", 576 "voip", 577 "taskKeeping" 578 ] 579 } 580 }, 581 "continuable": { 582 "description": "Identifies whether the ability can be migrated. The default value is false.", 583 "type": "boolean" 584 }, 585 "startWindowIcon": { 586 "description": "Indicates the icon of the startup page. The value is the index to the resource file.", 587 "type": "string", 588 "pattern": "^[$]media:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 589 "maxLength": 255 590 }, 591 "startWindowBackground": { 592 "description": "Indicates the color of the startup page. The value is the index to the resource file.", 593 "type": "string", 594 "pattern": "^[$]color:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 595 "maxLength": 255 596 }, 597 "removeMissionAfterTerminate": { 598 "description": "Specifies whether to remove the mission after the ability termination.", 599 "type": "boolean", 600 "default": false 601 }, 602 "orientation": { 603 "description": "Indicates the display orientation of the ability. This attribute is valid only for abilities using the Page template.", 604 "enum": [ 605 "unspecified", 606 "landscape", 607 "portrait", 608 "landscape_inverted", 609 "portrait_inverted", 610 "auto_rotation", 611 "auto_rotation_landscape", 612 "auto_rotation_portrait", 613 "auto_rotation_restricted", 614 "auto_rotation_landscape_restricted", 615 "auto_rotation_portrait_restricted", 616 "locked" 617 ], 618 "type": "string" 619 }, 620 "supportWindowMode": { 621 "description": "Specifies supported window modes", 622 "type": "array", 623 "uniqueItems": true, 624 "items": { 625 "type": "string", 626 "enum": [ 627 "fullscreen", 628 "split", 629 "floating" 630 ] 631 } 632 }, 633 "maxWindowRatio": { 634 "description": "This tag identifies the max window ratio. The value is an number.", 635 "type": "number", 636 "minimum": 0 637 }, 638 "minWindowRatio": { 639 "description": "This tag identifies the min window ratio. The value is an number.", 640 "type": "number", 641 "minimum": 0 642 }, 643 "maxWindowWidth": { 644 "description": "This tag identifies the min window ratio. The value is an integer.", 645 "type": "integer", 646 "minimum": 0 647 }, 648 "minWindowWidth": { 649 "description": "This tag identifies the min window ratio. The value is an integer.", 650 "type": "integer", 651 "minimum": 0 652 }, 653 "maxWindowHeight": { 654 "description": "This tag identifies the min window ratio. The value is an integer.", 655 "type": "integer", 656 "minimum": 0 657 }, 658 "minWindowHeight": { 659 "description": "This tag identifies the min window ratio. The value is an integer.", 660 "type": "integer", 661 "minimum": 0 662 }, 663 "excludeFromMissions": { 664 "description": "Specifies whether to display in the recent missions list. For system application only.", 665 "type": "boolean", 666 "default": false 667 } 668 } 669 } 670 }, 671 "extensionAbilities": { 672 "description": "Indicates all extensionAbilities in the current module.", 673 "type": "array", 674 "items": { 675 "type": "object", 676 "if": { 677 "properties": { 678 "type": { 679 "const": "dataShare" 680 } 681 } 682 }, 683 "then": { 684 "oneOf": [ 685 { 686 "required": [ 687 "name", 688 "srcEntrance", 689 "type", 690 "uri" 691 ] 692 }, 693 { 694 "required": [ 695 "name", 696 "srcEntry", 697 "type", 698 "uri" 699 ] 700 } 701 ] 702 }, 703 "else": { 704 "oneOf": [ 705 { 706 "required": [ 707 "name", 708 "srcEntrance", 709 "type" 710 ] 711 }, 712 { 713 "required": [ 714 "name", 715 "srcEntry", 716 "type" 717 ] 718 } 719 ] 720 }, 721 "propertyNames": { 722 "enum": [ 723 "priority", 724 "name", 725 "srcEntrance", 726 "srcEntry", 727 "icon", 728 "label", 729 "description", 730 "type", 731 "permissions", 732 "uri", 733 "readPermission", 734 "writePermission", 735 "visible", 736 "exported", 737 "skills", 738 "metadata" 739 ] 740 }, 741 "properties": { 742 "priority": { 743 "description": "Indicates the priority of the ability.Only for system application.This field is used for implicit query.Range from 0 to 10, default value is 0.", 744 "type": "integer", 745 "minimum": 0, 746 "maximum": 10 747 }, 748 "name": { 749 "description": "Indicates the name of the extension.", 750 "type": "string", 751 "maxLength": 127 752 }, 753 "srcEntrance": { 754 "description": "Indicates the js code path corresponding to the extension.", 755 "deprecationMessage": "Deprecated since api 9, use srcEntry instead.", 756 "type": "string", 757 "maxLength": 127 758 }, 759 "srcEntry": { 760 "description": "Indicates the js code path corresponding to the extension.", 761 "type": "string", 762 "maxLength": 127 763 }, 764 "icon": { 765 "description": "Indicates the index to the extension icon file.If the extension is configured as MainElement, the tag must be configured", 766 "type": "string", 767 "pattern": "^[$]media:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 768 }, 769 "label": { 770 "description": "Indicates the extension name visible to users. The tag value is set to the resource index of this name to support multiple languages.", 771 "type": "string", 772 "maxLength": 255, 773 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 774 }, 775 "description": { 776 "description": "Describes the extension. The value can be a string or a resource index to descriptions in multiple languages.This label can be left blank by default.", 777 "type": "string", 778 "maxLength": 255 779 }, 780 "type": { 781 "description": "Indicates the type of the extension.", 782 "type": "string", 783 "enum": [ 784 "form", 785 "workScheduler", 786 "inputMethod", 787 "service", 788 "accessibility", 789 "dataShare", 790 "fileShare", 791 "staticSubscriber", 792 "wallpaper", 793 "backup", 794 "window", 795 "enterpriseAdmin", 796 "thumbnail", 797 "preview" 798 ] 799 }, 800 "permissions": { 801 "description": "Indicates the permissions required for extensionAbilities of another application to call the current extension.", 802 "type": "array", 803 "uniqueItems": true, 804 "items": { 805 "type": "string", 806 "maxLength": 255 807 } 808 }, 809 "uri": { 810 "description": "Identifies the provided uri data for current extension.", 811 "type": "string", 812 "maxLength": 255 813 }, 814 "readPermission": { 815 "description": "Indicates the readPermission required for extensionAbilities of another application to call the current extension.", 816 "type": "string", 817 "maxLength": 255 818 }, 819 "writePermission": { 820 "description": "Indicates the writePermission required for extensionAbilities of another application to call the current extension.", 821 "type": "string", 822 "maxLength": 255 823 }, 824 "visible": { 825 "description": "Specifies whether the extension can be called by other applications.", 826 "deprecationMessage": "Deprecated since api 9, use exported instead.", 827 "type": "boolean", 828 "default": false 829 }, 830 "exported": { 831 "description": "Specifies whether the extension can be called by other applications.", 832 "type": "boolean", 833 "default": false 834 }, 835 "skills": { 836 "description": "Indicates the types of the intent that can be accepted by the extension.", 837 "type": "array", 838 "uniqueItems": true, 839 "items": { 840 "type": "object", 841 "propertyNames": { 842 "enum": [ 843 "actions", 844 "entities", 845 "uris" 846 ] 847 }, 848 "properties": { 849 "actions": { 850 "description": "Indicates the actions of the intent that can be accepted by the extension. The value can have one or multiple actions predefined in the system.", 851 "type": "array", 852 "uniqueItems": true, 853 "items": { 854 "type": "string" 855 } 856 }, 857 "entities": { 858 "description": "Indicates the entities of the intent that can be accepted by the extension, such as video and Home application. The value can have one or multiple entities either predefined in the system or be customized.", 859 "type": "array", 860 "uniqueItems": true, 861 "items": { 862 "type": "string" 863 } 864 }, 865 "uris": { 866 "description": "This tag identifies the collection of data specifications to be added to the Intent filter.", 867 "type": "array", 868 "uniqueItems": true, 869 "items": { 870 "anyOf": [ 871 { 872 "type": "object", 873 "propertyNames": { 874 "enum": [ 875 "scheme", 876 "host", 877 "port", 878 "pathStartWith", 879 "path", 880 "pathRegex", 881 "type" 882 ] 883 }, 884 "required": [ 885 "scheme" 886 ], 887 "properties": { 888 "scheme": { 889 "description": "This label is a string type.", 890 "type": "string" 891 }, 892 "host": { 893 "description": "This label is a string type.", 894 "type": "string" 895 }, 896 "port": { 897 "description": "This label is a string type.", 898 "type": "string" 899 }, 900 "pathStartWith": { 901 "description": "This label is a string type.", 902 "type": "string" 903 }, 904 "path": { 905 "description": "This label is a string type.", 906 "type": "string" 907 }, 908 "pathRegex": { 909 "description": "This label is a string type.", 910 "type": "string" 911 }, 912 "type": { 913 "description": "This label is a string type.", 914 "type": "string" 915 } 916 } 917 }, 918 { 919 "type": "object", 920 "propertyNames": { 921 "enum": [ 922 "type" 923 ] 924 }, 925 "properties": { 926 "type": { 927 "description": "This label is a string type.", 928 "type": "string" 929 } 930 } 931 } 932 ] 933 } 934 } 935 } 936 } 937 }, 938 "metadata": { 939 "description": "Indicates the metadata of the extension.", 940 "type": "array", 941 "items": { 942 "type": "object", 943 "propertyNames": { 944 "enum": [ 945 "name", 946 "value", 947 "resource" 948 ] 949 }, 950 "properties": { 951 "name": { 952 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 953 "type": "string", 954 "maxLength": 255 955 }, 956 "value": { 957 "description": "Indicates the value of a data element. The value is a string with a maximum of 255 bytes.", 958 "type": "string", 959 "maxLength": 255 960 }, 961 "resource": { 962 "description": "Indicates the resource of a data element.", 963 "type": "string", 964 "pattern": "^[$]profile:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 965 "maxLength": 255 966 } 967 } 968 } 969 } 970 } 971 } 972 }, 973 "definePermissions": { 974 "description": "Indicates the permissions defined by the application.", 975 "type": "array", 976 "uniqueItems": true, 977 "items": { 978 "type": "object", 979 "propertyNames": { 980 "enum": [ 981 "name", 982 "grantMode", 983 "availableLevel", 984 "provisionEnable", 985 "distributedSceneEnable", 986 "label", 987 "description" 988 ] 989 }, 990 "required": [ 991 "name" 992 ], 993 "properties": { 994 "name": { 995 "description": "Specifies the permission name. The value is a character string.", 996 "type": "string" 997 }, 998 "grantMode": { 999 "description": "This tag identifies the permission granting mode.", 1000 "type": "string", 1001 "enum": [ 1002 "system_grant", 1003 "user_grant" 1004 ], 1005 "default": "system_grant" 1006 }, 1007 "availableLevel": { 1008 "description": "This tag identifies the permission level.", 1009 "type": "string", 1010 "enum": [ 1011 "system_core", 1012 "system_basic", 1013 "normal" 1014 ], 1015 "default": "normal" 1016 }, 1017 "provisionEnable": { 1018 "description": "Specifies whether to support the certificate method to apply for permission.", 1019 "type": "boolean", 1020 "default": true 1021 }, 1022 "distributedSceneEnable": { 1023 "description": "Specifies whether to support the use of this permission in distributed scenarios.", 1024 "type": "boolean", 1025 "default": false 1026 }, 1027 "label": { 1028 "description": "This tag identifies the short description of the permission.", 1029 "type": "string", 1030 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 1031 }, 1032 "description": { 1033 "description": "This tag indicates the detailed description of the permission.", 1034 "type": "string" 1035 } 1036 } 1037 } 1038 }, 1039 "requestPermissions": { 1040 "description": "Indicates the permissions that the application applies for from the system before its running.This label can be left blank by default.", 1041 "type": "array", 1042 "items": { 1043 "type": "object", 1044 "propertyNames": { 1045 "enum": [ 1046 "name", 1047 "reason", 1048 "usedScene" 1049 ] 1050 }, 1051 "required": [ 1052 "name" 1053 ], 1054 "properties": { 1055 "name": { 1056 "description": "Specifies the permission name to be used.", 1057 "type": "string" 1058 }, 1059 "reason": { 1060 "description": "Describe the reason for applying for the permission.", 1061 "type": "string", 1062 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 1063 }, 1064 "usedScene": { 1065 "description": "This section describes the scenarios and timing of permission usage.", 1066 "type": "object", 1067 "propertyNames": { 1068 "enum": [ 1069 "abilities", 1070 "when" 1071 ] 1072 }, 1073 "properties": { 1074 "abilities": { 1075 "description": "This tag identifies the abilities that need the permission.", 1076 "type": "array", 1077 "uniqueItems": true, 1078 "items": { 1079 "type": "string" 1080 } 1081 }, 1082 "when": { 1083 "description": "This tag identifies the time when the permission is used.", 1084 "type": "string", 1085 "enum": [ 1086 "inuse", 1087 "always" 1088 ] 1089 } 1090 } 1091 } 1092 } 1093 } 1094 }, 1095 "testRunner": { 1096 "description": "This tag is used for configure the test properties.", 1097 "type":"object", 1098 "required": [ 1099 "name", 1100 "srcPath" 1101 ], 1102 "propertyNames": { 1103 "enum": [ 1104 "name", 1105 "srcPath" 1106 ] 1107 }, 1108 "properties":{ 1109 "name": { 1110 "description": "Indicates the name of testRunner, The value is a string with a maximum of 255 bytes", 1111 "type": "string", 1112 "maxLength": 255 1113 }, 1114 "srcPath": { 1115 "description": "Indicates the srcPath testRunner, The value is a string with a maximum of 255 bytes", 1116 "type": "string", 1117 "maxLength": 255 1118 } 1119 } 1120 }, 1121 "dependencies": { 1122 "description": "Indicates the module names that this module depends on.", 1123 "type": "array", 1124 "items": { 1125 "type": "object", 1126 "propertyNames": { 1127 "enum": [ 1128 "moduleName" 1129 ] 1130 }, 1131 "required": [ 1132 "moduleName" 1133 ], 1134 "properties":{ 1135 "moduleName": { 1136 "description": "Indicates the module name of the dependency shared library.", 1137 "type": "string", 1138 "maxLength": 31 1139 } 1140 } 1141 } 1142 }, 1143 "libIsolation": { 1144 "description": "Indicates whether to isolate the shared libraries in this module.", 1145 "type": "boolean" 1146 }, 1147 "atomicService": { 1148 "description": "Indicates the module config in atomic service.", 1149 "type": "object", 1150 "propertyNames": { 1151 "enum": [ 1152 "preloads" 1153 ] 1154 }, 1155 "properties": { 1156 "preloads": { 1157 "description": "Indicates modules are preloaded when the current module is run.", 1158 "type": "array", 1159 "uniqueItems": true, 1160 "items": { 1161 "type": "object", 1162 "propertyNames": { 1163 "enum": [ 1164 "moduleName" 1165 ] 1166 }, 1167 "properties": { 1168 "moduleName": { 1169 "description": "Indicates module is preloaded when the current module is run.", 1170 "type": "string", 1171 "maxLength": 31 1172 } 1173 } 1174 } 1175 } 1176 } 1177 } 1178 } 1179 } 1180 } 1181} 1182