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