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 "abilities", 38 "requestPermissions", 39 "dependencies", 40 "libIsolation", 41 "compressNativeLibs", 42 "installationFree", 43 "atomicService", 44 "targetModuleName", 45 "targetPriority", 46 "generateBuildHash", 47 "routerMap" 48 ] 49 }, 50 "required": [ 51 "name", 52 "type", 53 "deliveryWithInstall", 54 "deviceTypes" 55 ] 56 } 57 }, 58 { 59 "if": { 60 "properties": { 61 "type": { 62 "const": "har" 63 } 64 } 65 }, 66 "then": { 67 "propertyNames": { 68 "enum": [ 69 "name", 70 "type", 71 "srcEntrance", 72 "srcEntry", 73 "description", 74 "process", 75 "mainElement", 76 "deviceTypes", 77 "installationFree", 78 "virtualMachine", 79 "uiSyntax", 80 "metadata", 81 "abilities", 82 "extensionAbilities", 83 "requestPermissions", 84 "definePermissions", 85 "testRunner", 86 "dependencies", 87 "libIsolation", 88 "routerMap" 89 ] 90 }, 91 "required": [ 92 "name", 93 "type", 94 "deviceTypes" 95 ] 96 } 97 }, 98 { 99 "if": { 100 "properties": { 101 "type": { 102 "const": "entry" 103 } 104 } 105 }, 106 "then": { 107 "propertyNames": { 108 "enum": [ 109 "name", 110 "type", 111 "srcEntrance", 112 "srcEntry", 113 "description", 114 "process", 115 "mainElement", 116 "deviceTypes", 117 "deliveryWithInstall", 118 "installationFree", 119 "virtualMachine", 120 "uiSyntax", 121 "pages", 122 "metadata", 123 "abilities", 124 "extensionAbilities", 125 "requestPermissions", 126 "definePermissions", 127 "testRunner", 128 "dependencies", 129 "libIsolation", 130 "compressNativeLibs", 131 "atomicService", 132 "generateBuildHash", 133 "isolationMode", 134 "proxyData", 135 "fileContextMenu", 136 "querySchemes", 137 "routerMap", 138 "appEnvironments", 139 "appStartup", 140 "hnpPackages" 141 ] 142 }, 143 "required": [ 144 "name", 145 "type", 146 "deviceTypes", 147 "deliveryWithInstall" 148 ] 149 } 150 }, 151 { 152 "if": { 153 "properties": { 154 "type": { 155 "const": "feature" 156 } 157 } 158 }, 159 "then": { 160 "propertyNames": { 161 "enum": [ 162 "name", 163 "type", 164 "srcEntrance", 165 "srcEntry", 166 "description", 167 "process", 168 "mainElement", 169 "deviceTypes", 170 "deliveryWithInstall", 171 "installationFree", 172 "virtualMachine", 173 "uiSyntax", 174 "pages", 175 "metadata", 176 "abilities", 177 "extensionAbilities", 178 "requestPermissions", 179 "definePermissions", 180 "testRunner", 181 "dependencies", 182 "libIsolation", 183 "compressNativeLibs", 184 "atomicService", 185 "generateBuildHash", 186 "isolationMode", 187 "proxyData", 188 "routerMap", 189 "appEnvironments" 190 ] 191 }, 192 "required": [ 193 "name", 194 "type", 195 "deviceTypes", 196 "deliveryWithInstall" 197 ] 198 } 199 } 200 ], 201 "properties": { 202 "name": { 203 "description": "Indicates the module name.", 204 "type": "string", 205 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]*$", 206 "maxLength": 128 207 }, 208 "type": { 209 "description": "Indicates the type of the module.", 210 "type": "string", 211 "enum": [ 212 "entry", 213 "feature", 214 "har", 215 "shared" 216 ] 217 }, 218 "srcEntrance": { 219 "description": "This tag indicates the entry js code path corresponding to hap", 220 "type": "string", 221 "deprecationMessage": "Deprecated since api 9, use srcEntry instead.", 222 "maxLength": 127 223 }, 224 "srcEntry": { 225 "description": "This tag indicates the entry js code path corresponding to hap", 226 "type": "string", 227 "maxLength": 127 228 }, 229 "description": { 230 "description": "Indicates the description of the current .hap file.", 231 "type": "string", 232 "maxLength": 255 233 }, 234 "process": { 235 "description": "Indicates the name of the process running the module.", 236 "type": "string", 237 "maxLength": 31 238 }, 239 "mainElement": { 240 "description": "Describes hap entry ability name or extension name.", 241 "type": "string", 242 "maxLength": 255 243 }, 244 "deviceTypes": { 245 "description": "Indicates the type of devices on which the abilities can run.This label cannot be left blank.", 246 "type": "array", 247 "uniqueItems": true, 248 "items": { 249 "type": "string", 250 "enum": [ 251 "default", 252 "tablet", 253 "tv", 254 "wearable", 255 "car", 256 "2in1" 257 ] 258 } 259 }, 260 "deliveryWithInstall": { 261 "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.", 262 "type": "boolean" 263 }, 264 "installationFree": { 265 "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", 266 "type": "boolean" 267 }, 268 "virtualMachine": { 269 "description": "Identify the type of target virtual machine currently running hap.", 270 "type": "string", 271 "enum": [ 272 "ark", 273 "default" 274 ], 275 "default": "default" 276 }, 277 "uiSyntax": { 278 "description": "Indicates the syntax type of ETS Component.Default is hml.", 279 "deprecationMessage": "Deprecated since api 9", 280 "type": "string", 281 "enum": [ 282 "ets", 283 "hml" 284 ], 285 "default": "hml" 286 }, 287 "pages": { 288 "description": "Used to list the information of each page in ETS Component.", 289 "type": "string", 290 "pattern": "^[$]profile:[0-9a-zA-Z_.]+$", 291 "maxLength": 255 292 }, 293 "metadata": { 294 "description": "Indicates the metadata of the module.", 295 "type": "array", 296 "items": { 297 "type": "object", 298 "propertyNames": { 299 "enum": [ 300 "name", 301 "value", 302 "resource" 303 ] 304 }, 305 "properties": { 306 "name": { 307 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 308 "type": "string", 309 "maxLength": 255 310 }, 311 "value": { 312 "description": "Indicates the value of a data element. The value is a string with a maximum of 255 bytes.", 313 "type": "string", 314 "maxLength": 255 315 }, 316 "resource": { 317 "description": "Indicates the resource of a data element.", 318 "type": "string", 319 "pattern": "^[$]profile:[0-9a-zA-Z_.]+$", 320 "maxLength": 255 321 } 322 } 323 } 324 }, 325 "abilities": { 326 "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.", 327 "type": "array", 328 "uniqueItems": true, 329 "items": { 330 "type": "object", 331 "required": [ 332 "name", 333 "srcEntry", 334 "startWindowIcon", 335 "startWindowBackground" 336 ], 337 "propertyNames": { 338 "enum": [ 339 "priority", 340 "name", 341 "srcEntrance", 342 "srcEntry", 343 "launchType", 344 "description", 345 "icon", 346 "label", 347 "permissions", 348 "metadata", 349 "visible", 350 "exported", 351 "skills", 352 "backgroundModes", 353 "continuable", 354 "startWindowIcon", 355 "startWindowBackground", 356 "removeMissionAfterTerminate", 357 "orientation", 358 "supportWindowMode", 359 "maxWindowRatio", 360 "minWindowRatio", 361 "maxWindowWidth", 362 "minWindowWidth", 363 "maxWindowHeight", 364 "minWindowHeight", 365 "excludeFromMissions", 366 "recoverable", 367 "unclearableMission", 368 "excludeFromDock", 369 "preferMultiWindowOrientation", 370 "isolationProcess", 371 "continueType", 372 "continueBundleName", 373 "process" 374 ] 375 }, 376 "properties": { 377 "priority": { 378 "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.", 379 "type": "integer", 380 "minimum": 0, 381 "maximum": 10 382 }, 383 "name": { 384 "description": "Indicates the name of the ability.", 385 "type": "string", 386 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]*$", 387 "maxLength": 127 388 }, 389 "srcEntrance": { 390 "description": "Indicates the js code path corresponding to the ability.", 391 "type": "string", 392 "deprecationMessage": "Deprecated since api 9, use srcEntry instead.", 393 "maxLength": 127 394 }, 395 "srcEntry": { 396 "description": "Indicates the js code path corresponding to the ability.", 397 "type": "string", 398 "maxLength": 127 399 }, 400 "launchType": { 401 "description": "Indicates the boot mode of ability.", 402 "type": "string", 403 "enum": [ 404 "standard", 405 "singleton", 406 "specified", 407 "multiton" 408 ], 409 "default": "singleton" 410 }, 411 "description": { 412 "description": "Describes the ability.", 413 "type": "string", 414 "maxLength": 255 415 }, 416 "icon": { 417 "description": "Indicates the index to the ability icon file, in the format of \"$media:ability_icon\".This label can be left blank by default.", 418 "type": "string", 419 "pattern": "^[$]media:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 420 }, 421 "label": { 422 "description": "Indicates the ability name visible to users. The tag value is set to the resource index of this name to support multiple languages.", 423 "type": "string", 424 "maxLength": 255, 425 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 426 }, 427 "permissions": { 428 "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.", 429 "type": "array", 430 "uniqueItems": true, 431 "items": { 432 "type": "string", 433 "maxLength": 255 434 } 435 }, 436 "metadata": { 437 "description": "Indicates the metadata of the ability.", 438 "type": "array", 439 "items": { 440 "type": "object", 441 "propertyNames": { 442 "enum": [ 443 "name", 444 "value", 445 "resource" 446 ] 447 }, 448 "properties": { 449 "name": { 450 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 451 "type": "string", 452 "maxLength": 255 453 }, 454 "value": { 455 "description": "Indicates the value of a data element. The value is a string with a maximum of 255 bytes.", 456 "type": "string", 457 "maxLength": 255 458 }, 459 "resource": { 460 "description": "Indicates the resource of a data element.", 461 "type": "string", 462 "pattern": "^[$]profile:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 463 "maxLength": 255 464 } 465 } 466 } 467 }, 468 "visible": { 469 "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.", 470 "type": "boolean", 471 "deprecationMessage": "Deprecated since api 9, use exported instead.", 472 "default": false 473 }, 474 "exported": { 475 "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.", 476 "type": "boolean", 477 "default": false 478 }, 479 "skills": { 480 "description": "Indicates the types of the intent that can be accepted by the ability.", 481 "type": "array", 482 "items": { 483 "type": "object", 484 "uniqueItems": true, 485 "propertyNames": { 486 "enum": [ 487 "actions", 488 "entities", 489 "uris", 490 "permissions", 491 "domainVerify" 492 ] 493 }, 494 "properties": { 495 "actions": { 496 "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.", 497 "type": "array", 498 "uniqueItems": true, 499 "items": { 500 "type": "string" 501 } 502 }, 503 "entities": { 504 "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.", 505 "type": "array", 506 "items": { 507 "type": "string" 508 }, 509 "uniqueItems": true 510 }, 511 "uris": { 512 "description": "This tag identifies the collection of data specifications to be added to the Intent filter.", 513 "type": "array", 514 "items": { 515 "anyOf": [ 516 { 517 "type": "object", 518 "propertyNames": { 519 "enum": [ 520 "scheme", 521 "host", 522 "port", 523 "pathStartWith", 524 "path", 525 "pathRegex", 526 "type", 527 "utd", 528 "maxFileSupported", 529 "linkFeature" 530 ] 531 }, 532 "required": [ 533 "scheme" 534 ], 535 "properties": { 536 "scheme": { 537 "description": "This label is a string type.", 538 "type": "string" 539 }, 540 "host": { 541 "description": "This label is a string type.", 542 "type": "string" 543 }, 544 "port": { 545 "description": "This label is a string type.", 546 "type": "string" 547 }, 548 "pathStartWith": { 549 "description": "This label is a string type.", 550 "type": "string" 551 }, 552 "path": { 553 "description": "This label is a string type.", 554 "type": "string" 555 }, 556 "pathRegex": { 557 "description": "This label is a string type.", 558 "type": "string" 559 }, 560 "type": { 561 "description": "This label is a string type.", 562 "type": "string" 563 }, 564 "utd": { 565 "description": "Indicates the uniform file type supported by the ability. Please refer to https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.data.uniformTypeDescriptor.d.ts for detailed information", 566 "type": "string" 567 }, 568 "maxFileSupported": { 569 "description": "Indicates the maximum number of files that can be received.", 570 "type": "integer" 571 }, 572 "linkFeature": { 573 "description": "Indicates the uri feature.", 574 "type": "string", 575 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]*$", 576 "maxLength": 127 577 } 578 } 579 }, 580 { 581 "type": "object", 582 "propertyNames": { 583 "enum": [ 584 "type" 585 ] 586 }, 587 "properties": { 588 "type": { 589 "description": "This label is a string type.", 590 "type": "string" 591 } 592 } 593 } 594 ] 595 } 596 }, 597 "permissions": { 598 "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.", 599 "type": "array", 600 "uniqueItems": true, 601 "items": { 602 "type": "string", 603 "pattern": "^[a-zA-Z][a-zA-Z_.]*$", 604 "maxLength": 255 605 } 606 }, 607 "domainVerify": { 608 "description": "Specifies whether the ability support domain verification. The \"true\" indicates the ability support domain verification. The \"false\" indicates the ability does not support domain verification. This tag is optional. The default value is false.", 609 "type": "boolean", 610 "default": false 611 } 612 } 613 } 614 }, 615 "backgroundModes": { 616 "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.", 617 "type": "array", 618 "uniqueItems": true, 619 "items": { 620 "type": "string", 621 "enum": [ 622 "dataTransfer", 623 "audioPlayback", 624 "audioRecording", 625 "location", 626 "bluetoothInteraction", 627 "multiDeviceConnection", 628 "wifiInteraction", 629 "voip", 630 "taskKeeping" 631 ] 632 } 633 }, 634 "continuable": { 635 "description": "Identifies whether the ability can be migrated. The default value is false.", 636 "type": "boolean" 637 }, 638 "startWindowIcon": { 639 "description": "Indicates the icon of the startup page. The value is the index to the resource file.", 640 "type": "string", 641 "pattern": "^[$]media:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 642 "maxLength": 255 643 }, 644 "startWindowBackground": { 645 "description": "Indicates the color of the startup page. The value is the index to the resource file.", 646 "type": "string", 647 "pattern": "^[$]color:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 648 "maxLength": 255 649 }, 650 "removeMissionAfterTerminate": { 651 "description": "Specifies whether to remove the mission after the ability termination.", 652 "type": "boolean", 653 "default": false 654 }, 655 "orientation": { 656 "description": "Indicates the display orientation of the ability. This attribute is valid only for abilities using the Page template.", 657 "oneOf": [ 658 { 659 "enum": [ 660 "unspecified", 661 "landscape", 662 "portrait", 663 "follow_recent", 664 "landscape_inverted", 665 "portrait_inverted", 666 "auto_rotation", 667 "auto_rotation_landscape", 668 "auto_rotation_portrait", 669 "auto_rotation_restricted", 670 "auto_rotation_landscape_restricted", 671 "auto_rotation_portrait_restricted", 672 "locked", 673 "auto_rotation_unspecified", 674 "follow_desktop" 675 ] 676 }, 677 { 678 "maxLength": 255, 679 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 680 } 681 ], 682 "type": "string" 683 }, 684 "supportWindowMode": { 685 "description": "Specifies supported window modes", 686 "type": "array", 687 "uniqueItems": true, 688 "items": { 689 "type": "string", 690 "enum": [ 691 "fullscreen", 692 "split", 693 "floating" 694 ] 695 } 696 }, 697 "maxWindowRatio": { 698 "description": "This tag identifies the max window ratio. The value is an number.", 699 "type": "number", 700 "minimum": 0 701 }, 702 "minWindowRatio": { 703 "description": "This tag identifies the min window ratio. The value is an number.", 704 "type": "number", 705 "minimum": 0 706 }, 707 "maxWindowWidth": { 708 "description": "This tag identifies the min window ratio. The value is an integer.", 709 "type": "integer", 710 "minimum": 0 711 }, 712 "minWindowWidth": { 713 "description": "This tag identifies the min window ratio. The value is an integer.", 714 "type": "integer", 715 "minimum": 0 716 }, 717 "maxWindowHeight": { 718 "description": "This tag identifies the min window ratio. The value is an integer.", 719 "type": "integer", 720 "minimum": 0 721 }, 722 "minWindowHeight": { 723 "description": "This tag identifies the min window ratio. The value is an integer.", 724 "type": "integer", 725 "minimum": 0 726 }, 727 "excludeFromMissions": { 728 "description": "Specifies whether to display in the recent missions list. For system application only.", 729 "type": "boolean", 730 "default": false 731 }, 732 "recoverable": { 733 "description": "Specifies whether to support recover UI interface", 734 "type": "boolean", 735 "default": false 736 }, 737 "unclearableMission": { 738 "description": "Specify whether it is a task that cannot be deleted", 739 "type": "boolean", 740 "default": false 741 }, 742 "excludeFromDock": { 743 "description": "Specify whether to hide the application icon from the dock area.", 744 "type": "boolean", 745 "default": false 746 }, 747 "preferMultiWindowOrientation": { 748 "description": "Indicates the prefered multi window orientation.", 749 "type": "string", 750 "enum": [ 751 "default", 752 "portrait", 753 "landscape", 754 "landscape_auto" 755 756 ], 757 "default": "default" 758 }, 759 "isolationProcess": { 760 "description": "Specifies whether the ability can run in an independent process", 761 "type": "boolean", 762 "default": false 763 }, 764 "continueType": { 765 "description": "Identifies the type of the ability can be migrated.", 766 "type": "array", 767 "uniqueItems": true, 768 "maxLength": 100, 769 "items": { 770 "type": "string", 771 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]*$", 772 "maxLength": 127 773 } 774 }, 775 "continueBundleName": { 776 "description": "Configure the package names of other applications to be connected.", 777 "type": "array", 778 "uniqueItems": true, 779 "items": { 780 "type": "string", 781 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$", 782 "maxLength": 128, 783 "minLength": 7 784 } 785 }, 786 "process": { 787 "description": "Running process tag the ability.", 788 "type": "string", 789 "maxLength": 31, 790 "pattern": "^[:][0-9a-zA-Z_]+$" 791 } 792 } 793 } 794 }, 795 "extensionAbilities": { 796 "description": "Indicates all extensionAbilities in the current module.", 797 "type": "array", 798 "items": { 799 "type": "object", 800 "allOf": [ 801 { 802 "if": { 803 "properties": { 804 "type": { 805 "const": "dataShare" 806 } 807 } 808 }, 809 "then": { 810 "oneOf": [ 811 { 812 "required": [ 813 "name", 814 "srcEntrance", 815 "type", 816 "uri" 817 ] 818 }, 819 { 820 "required": [ 821 "name", 822 "srcEntry", 823 "type", 824 "uri" 825 ] 826 } 827 ] 828 }, 829 "else": { 830 "oneOf": [ 831 { 832 "required": [ 833 "name", 834 "srcEntrance", 835 "type" 836 ] 837 }, 838 { 839 "required": [ 840 "name", 841 "srcEntry", 842 "type" 843 ] 844 } 845 ] 846 } 847 }, 848 { 849 "if": { 850 "properties": { 851 "type": { 852 "const": "embeddedUI" 853 } 854 } 855 }, 856 "then": { 857 "propertyNames": { 858 "enum": [ 859 "priority", 860 "name", 861 "srcEntrance", 862 "srcEntry", 863 "icon", 864 "label", 865 "description", 866 "type", 867 "permissions", 868 "uri", 869 "readPermission", 870 "writePermission", 871 "visible", 872 "exported", 873 "skills", 874 "metadata", 875 "extensionProcessMode", 876 "dataGroupIds", 877 "process" 878 ] 879 } 880 }, 881 "else": { 882 "propertyNames": { 883 "enum": [ 884 "priority", 885 "name", 886 "srcEntrance", 887 "srcEntry", 888 "icon", 889 "label", 890 "description", 891 "type", 892 "permissions", 893 "uri", 894 "readPermission", 895 "writePermission", 896 "visible", 897 "exported", 898 "skills", 899 "metadata", 900 "extensionProcessMode", 901 "dataGroupIds" 902 ] 903 } 904 } 905 } 906 ], 907 "properties": { 908 "priority": { 909 "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.", 910 "type": "integer", 911 "minimum": 0, 912 "maximum": 10 913 }, 914 "name": { 915 "description": "Indicates the name of the extension.", 916 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]*$", 917 "type": "string", 918 "maxLength": 127 919 }, 920 "srcEntrance": { 921 "description": "Indicates the js code path corresponding to the extension.", 922 "deprecationMessage": "Deprecated since api 9, use srcEntry instead.", 923 "type": "string", 924 "maxLength": 127 925 }, 926 "srcEntry": { 927 "description": "Indicates the js code path corresponding to the extension.", 928 "type": "string", 929 "maxLength": 127 930 }, 931 "icon": { 932 "description": "Indicates the index to the extension icon file.If the extension is configured as MainElement, the tag must be configured", 933 "type": "string", 934 "pattern": "^[$]media:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 935 }, 936 "label": { 937 "description": "Indicates the extension name visible to users. The tag value is set to the resource index of this name to support multiple languages.", 938 "type": "string", 939 "maxLength": 255, 940 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 941 }, 942 "description": { 943 "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.", 944 "type": "string", 945 "maxLength": 255 946 }, 947 "type": { 948 "description": "Indicates the type of the extension.", 949 "type": "string", 950 "enum": [ 951 "form", 952 "workScheduler", 953 "inputMethod", 954 "service", 955 "accessibility", 956 "dataShare", 957 "fileShare", 958 "staticSubscriber", 959 "wallpaper", 960 "backup", 961 "window", 962 "enterpriseAdmin", 963 "thumbnail", 964 "preview", 965 "print", 966 "share", 967 "push", 968 "driver", 969 "action", 970 "adsService", 971 "embeddedUI", 972 "insightIntentUI", 973 "statusBarView", 974 "autoFill/password", 975 "hms/account", 976 "appAccountAuthorization", 977 "ads", 978 "fence", 979 "remoteNotification", 980 "remoteLocation", 981 "voip", 982 "accountLogout", 983 "sysDialog/userAuth", 984 "sysDialog/common", 985 "sysDialog/atomicServicePanel", 986 "sysDialog/power", 987 "sysDialog/meetimeCall", 988 "sysDialog/meetimeContact", 989 "sysDialog/meetimeMessage", 990 "sysDialog/print", 991 "sysPicker/mediaControl", 992 "sysPicker/share", 993 "sysPicker/meetimeContact", 994 "sysPicker/meetimeCallLog", 995 "sysPicker/photoPicker", 996 "sysPicker/appSelector", 997 "sysPicker/navigation", 998 "sysPicker/photoEditor", 999 "photoEditor", 1000 "sys/commonUI", 1001 "fileAccess", 1002 "sysPicker/camera", 1003 "autoFill/smart", 1004 "liveViewLockScreen", 1005 "sysPicker/filePicker", 1006 "sysPicker/audioPicker", 1007 "sys/visualExtension", 1008 "uiService", 1009 "recentPhoto", 1010 "callerInfoQuery" 1011 ] 1012 }, 1013 "permissions": { 1014 "description": "Indicates the permissions required for extensionAbilities of another application to call the current extension.", 1015 "type": "array", 1016 "uniqueItems": true, 1017 "items": { 1018 "type": "string", 1019 "maxLength": 255 1020 } 1021 }, 1022 "uri": { 1023 "description": "Identifies the provided uri data for current extension.", 1024 "type": "string", 1025 "maxLength": 255 1026 }, 1027 "readPermission": { 1028 "description": "Indicates the readPermission required for extensionAbilities of another application to call the current extension.", 1029 "type": "string", 1030 "maxLength": 255 1031 }, 1032 "writePermission": { 1033 "description": "Indicates the writePermission required for extensionAbilities of another application to call the current extension.", 1034 "type": "string", 1035 "maxLength": 255 1036 }, 1037 "visible": { 1038 "description": "Specifies whether the extension can be called by other applications.", 1039 "deprecationMessage": "Deprecated since api 9, use exported instead.", 1040 "type": "boolean", 1041 "default": false 1042 }, 1043 "exported": { 1044 "description": "Specifies whether the extension can be called by other applications.", 1045 "type": "boolean", 1046 "default": false 1047 }, 1048 "skills": { 1049 "description": "Indicates the types of the intent that can be accepted by the extension.", 1050 "type": "array", 1051 "uniqueItems": true, 1052 "items": { 1053 "type": "object", 1054 "propertyNames": { 1055 "enum": [ 1056 "actions", 1057 "entities", 1058 "uris", 1059 "permissions" 1060 ] 1061 }, 1062 "properties": { 1063 "actions": { 1064 "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.", 1065 "type": "array", 1066 "uniqueItems": true, 1067 "items": { 1068 "type": "string" 1069 } 1070 }, 1071 "entities": { 1072 "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.", 1073 "type": "array", 1074 "uniqueItems": true, 1075 "items": { 1076 "type": "string" 1077 } 1078 }, 1079 "uris": { 1080 "description": "This tag identifies the collection of data specifications to be added to the Intent filter.", 1081 "type": "array", 1082 "uniqueItems": true, 1083 "items": { 1084 "anyOf": [ 1085 { 1086 "type": "object", 1087 "propertyNames": { 1088 "enum": [ 1089 "scheme", 1090 "host", 1091 "port", 1092 "pathStartWith", 1093 "path", 1094 "pathRegex", 1095 "type", 1096 "utd", 1097 "maxFileSupported" 1098 ] 1099 }, 1100 "required": [ 1101 "scheme" 1102 ], 1103 "properties": { 1104 "scheme": { 1105 "description": "This label is a string type.", 1106 "type": "string" 1107 }, 1108 "host": { 1109 "description": "This label is a string type.", 1110 "type": "string" 1111 }, 1112 "port": { 1113 "description": "This label is a string type.", 1114 "type": "string" 1115 }, 1116 "pathStartWith": { 1117 "description": "This label is a string type.", 1118 "type": "string" 1119 }, 1120 "path": { 1121 "description": "This label is a string type.", 1122 "type": "string" 1123 }, 1124 "pathRegex": { 1125 "description": "This label is a string type.", 1126 "type": "string" 1127 }, 1128 "type": { 1129 "description": "This label is a string type.", 1130 "type": "string" 1131 }, 1132 "utd": { 1133 "description": "Indicates the uniform file type supported by the ability. Please refer to https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.data.uniformTypeDescriptor.d.ts for detailed information", 1134 "type": "string" 1135 }, 1136 "maxFileSupported": { 1137 "description": "Indicates the maximum number of files that can be received.", 1138 "type": "integer" 1139 } 1140 } 1141 }, 1142 { 1143 "type": "object", 1144 "propertyNames": { 1145 "enum": [ 1146 "type" 1147 ] 1148 }, 1149 "properties": { 1150 "type": { 1151 "description": "This label is a string type.", 1152 "type": "string" 1153 } 1154 } 1155 } 1156 ] 1157 } 1158 }, 1159 "permissions": { 1160 "description": "Indicates the permissions required for extensionAbilities of another application to call the current extension.", 1161 "type": "array", 1162 "uniqueItems": true, 1163 "items": { 1164 "type": "string", 1165 "pattern": "^[a-zA-Z][a-zA-Z_.]*$", 1166 "maxLength": 255 1167 } 1168 } 1169 } 1170 } 1171 }, 1172 "metadata": { 1173 "description": "Indicates the metadata of the extension.", 1174 "type": "array", 1175 "items": { 1176 "type": "object", 1177 "propertyNames": { 1178 "enum": [ 1179 "name", 1180 "value", 1181 "resource" 1182 ] 1183 }, 1184 "properties": { 1185 "name": { 1186 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 1187 "type": "string", 1188 "maxLength": 255 1189 }, 1190 "value": { 1191 "description": "Indicates the value of a data element. The value is a string with a maximum of 255 bytes.", 1192 "type": "string", 1193 "maxLength": 255 1194 }, 1195 "resource": { 1196 "description": "Indicates the resource of a data element.", 1197 "type": "string", 1198 "pattern": "^([$]profile:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+)|(^(\/[\\w-]+)+(.[a-z]+)?)$", 1199 "maxLength": 255 1200 } 1201 } 1202 } 1203 }, 1204 "dataGroupIds": { 1205 "description": "Indicates the data group IDs associated with the extension ability.", 1206 "type": "array", 1207 "maxItems": 1024, 1208 "items": { 1209 "type": "string", 1210 "minLength": 1, 1211 "maxLength": 1024, 1212 "pattern": "^[\\x00-\\x7F]*$" 1213 } 1214 }, 1215 "process": { 1216 "description": "Running process tag the extension ability.", 1217 "type": "string", 1218 "maxLength": 31, 1219 "pattern": "^[:][0-9a-zA-Z_]+$" 1220 } 1221 }, 1222 "if": { 1223 "properties": { 1224 "type": { 1225 "const": "statusBarView" 1226 } 1227 } 1228 }, 1229 "then": { 1230 "properties": { 1231 "extensionProcessMode": { 1232 "description": "Indicates the extension support multi instance model.", 1233 "type": "string", 1234 "enum": [ 1235 "instance", 1236 "type", 1237 "bundle", 1238 "runWithMainProcess" 1239 ], 1240 "default": "instance" 1241 } 1242 } 1243 }, 1244 "else": { 1245 "properties": { 1246 "extensionProcessMode": { 1247 "description": "Indicates the extension support multi instance model.", 1248 "type": "string", 1249 "enum": [ 1250 "instance", 1251 "type", 1252 "bundle" 1253 ], 1254 "default": "instance" 1255 } 1256 } 1257 } 1258 } 1259 }, 1260 "definePermissions": { 1261 "description": "Indicates the permissions defined by the application.", 1262 "type": "array", 1263 "uniqueItems": true, 1264 "items": { 1265 "type": "object", 1266 "propertyNames": { 1267 "enum": [ 1268 "name", 1269 "grantMode", 1270 "availableLevel", 1271 "provisionEnable", 1272 "distributedSceneEnable", 1273 "label", 1274 "description" 1275 ] 1276 }, 1277 "required": [ 1278 "name" 1279 ], 1280 "properties": { 1281 "name": { 1282 "description": "Specifies the permission name. The value is a character string.", 1283 "type": "string" 1284 }, 1285 "grantMode": { 1286 "description": "This tag identifies the permission granting mode.", 1287 "type": "string", 1288 "enum": [ 1289 "system_grant", 1290 "user_grant" 1291 ], 1292 "default": "system_grant" 1293 }, 1294 "availableLevel": { 1295 "description": "This tag identifies the permission level.", 1296 "type": "string", 1297 "enum": [ 1298 "system_core", 1299 "system_basic", 1300 "normal" 1301 ], 1302 "default": "normal" 1303 }, 1304 "provisionEnable": { 1305 "description": "Specifies whether to support the certificate method to apply for permission.", 1306 "type": "boolean", 1307 "default": true 1308 }, 1309 "distributedSceneEnable": { 1310 "description": "Specifies whether to support the use of this permission in distributed scenarios.", 1311 "type": "boolean", 1312 "default": false 1313 }, 1314 "label": { 1315 "description": "This tag identifies the short description of the permission.", 1316 "type": "string", 1317 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 1318 }, 1319 "description": { 1320 "description": "This tag indicates the detailed description of the permission.", 1321 "type": "string" 1322 } 1323 } 1324 } 1325 }, 1326 "requestPermissions": { 1327 "description": "Indicates the permissions that the application applies for from the system before its running.This label can be left blank by default.", 1328 "type": "array", 1329 "items": { 1330 "type": "object", 1331 "propertyNames": { 1332 "enum": [ 1333 "name", 1334 "reason", 1335 "usedScene" 1336 ] 1337 }, 1338 "required": [ 1339 "name" 1340 ], 1341 "properties": { 1342 "name": { 1343 "description": "Specifies the permission name to be used.", 1344 "type": "string" 1345 }, 1346 "reason": { 1347 "description": "Describe the reason for applying for the permission.", 1348 "type": "string", 1349 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 1350 }, 1351 "usedScene": { 1352 "description": "This section describes the scenarios and timing of permission usage.", 1353 "type": "object", 1354 "propertyNames": { 1355 "enum": [ 1356 "abilities", 1357 "when" 1358 ] 1359 }, 1360 "properties": { 1361 "abilities": { 1362 "description": "This tag identifies the abilities that need the permission.", 1363 "type": "array", 1364 "uniqueItems": true, 1365 "items": { 1366 "type": "string" 1367 } 1368 }, 1369 "when": { 1370 "description": "This tag identifies the time when the permission is used.", 1371 "type": "string", 1372 "enum": [ 1373 "inuse", 1374 "always" 1375 ] 1376 } 1377 } 1378 } 1379 } 1380 } 1381 }, 1382 "testRunner": { 1383 "description": "This tag is used for configure the test properties.", 1384 "type":"object", 1385 "required": [ 1386 "name", 1387 "srcPath" 1388 ], 1389 "propertyNames": { 1390 "enum": [ 1391 "name", 1392 "srcPath" 1393 ] 1394 }, 1395 "properties":{ 1396 "name": { 1397 "description": "Indicates the name of testRunner, The value is a string with a maximum of 255 bytes", 1398 "type": "string", 1399 "maxLength": 255 1400 }, 1401 "srcPath": { 1402 "description": "Indicates the srcPath testRunner, The value is a string with a maximum of 255 bytes", 1403 "type": "string", 1404 "maxLength": 255 1405 } 1406 } 1407 }, 1408 "dependencies": { 1409 "description": "Indicates the module names that this module depends on.", 1410 "type": "array", 1411 "uniqueItems": true, 1412 "items": { 1413 "type": "object", 1414 "propertyNames": { 1415 "enum": [ 1416 "bundleName", 1417 "moduleName", 1418 "versionCode" 1419 ] 1420 }, 1421 "required": [ 1422 "moduleName" 1423 ], 1424 "properties":{ 1425 "bundleName": { 1426 "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 128 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.", 1427 "type": "string", 1428 "maxLength": 128, 1429 "minLength": 7, 1430 "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$" 1431 }, 1432 "moduleName": { 1433 "description": "Indicates the module name of the dependency shared library.", 1434 "type": "string", 1435 "maxLength": 128 1436 }, 1437 "versionCode": { 1438 "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.", 1439 "type": "integer", 1440 "minimum": 0, 1441 "maximum": 2147483647 1442 } 1443 } 1444 } 1445 }, 1446 "libIsolation": { 1447 "description": "Indicates whether to isolate the shared libraries in this module.", 1448 "type": "boolean" 1449 }, 1450 "compressNativeLibs": { 1451 "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.", 1452 "type": "boolean", 1453 "default": false 1454 }, 1455 "atomicService": { 1456 "description": "Indicates the module config in atomic service.", 1457 "type": "object", 1458 "propertyNames": { 1459 "enum": [ 1460 "preloads" 1461 ] 1462 }, 1463 "properties": { 1464 "preloads": { 1465 "description": "Indicates modules are preloaded when the current module is run.", 1466 "type": "array", 1467 "uniqueItems": true, 1468 "items": { 1469 "type": "object", 1470 "propertyNames": { 1471 "enum": [ 1472 "moduleName" 1473 ] 1474 }, 1475 "properties": { 1476 "moduleName": { 1477 "description": "Indicates module is preloaded when the current module is run.", 1478 "type": "string", 1479 "maxLength": 128 1480 } 1481 } 1482 } 1483 } 1484 } 1485 }, 1486 "targetModuleName": { 1487 "description": "Indicates the target module name of an overlay module.", 1488 "type": "string", 1489 "pattern": "[^\u4e00-\u9fa5]+", 1490 "maxLength": 128 1491 }, 1492 "targetPriority": { 1493 "description": "Indicates the priority of the overlay module. 1 to 100, default value is 1.", 1494 "type": "integer", 1495 "minimum": 1, 1496 "maximum": 100 1497 }, 1498 "generateBuildHash": { 1499 "description": "Indicates whether the hash value of hap or hsp is filed with in module.json.", 1500 "type": "boolean", 1501 "default": false 1502 }, 1503 "isolationMode": { 1504 "description": "Indicates the module process isolation mode.", 1505 "type": "string", 1506 "enum": [ 1507 "isolationOnly", 1508 "nonisolationOnly", 1509 "isolationFirst", 1510 "nonisolationFirst" 1511 ], 1512 "default": "nonisolationFirst" 1513 }, 1514 "proxyData": { 1515 "description": "Indicates all the proxy data of the module.", 1516 "type": "array", 1517 "items": { 1518 "type": "object", 1519 "required": [ 1520 "uri" 1521 ], 1522 "propertyNames": { 1523 "enum": [ 1524 "uri", 1525 "requiredReadPermission", 1526 "requiredWritePermission", 1527 "metadata" 1528 ] 1529 }, 1530 "properties": { 1531 "uri": { 1532 "description": "Indicates the uri of the data proxy.", 1533 "type": "string", 1534 "pattern": "^datashareproxy:", 1535 "maxLength": 255 1536 }, 1537 "requiredReadPermission": { 1538 "description": "Indicates the permission required to read data from the proxy.", 1539 "type": "string", 1540 "maxLength": 255 1541 }, 1542 "requiredWritePermission": { 1543 "description": "Indicates the permission required to write data to the proxy.", 1544 "type": "string", 1545 "maxLength": 255 1546 }, 1547 "metadata": { 1548 "description": "Indicates the metadata of the proxy.", 1549 "type": "object", 1550 "propertyNames": { 1551 "enum": [ 1552 "name", 1553 "resource" 1554 ] 1555 }, 1556 "properties": { 1557 "name": { 1558 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 1559 "type": "string", 1560 "maxLength": 255 1561 }, 1562 "resource": { 1563 "description": "Indicates the resource of a data element.", 1564 "type": "string", 1565 "pattern": "^[$]profile:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 1566 "maxLength": 255 1567 } 1568 } 1569 } 1570 } 1571 } 1572 }, 1573 "fileContextMenu": { 1574 "description": "Indicates the menu profile.", 1575 "type": "string", 1576 "pattern": "^[$]profile:[0-9a-zA-Z_.]+$", 1577 "maxLength": 255 1578 }, 1579 "querySchemes": { 1580 "description": "Indicates the URL schemes control list", 1581 "type": "array", 1582 "uniqueItems": true, 1583 "maxItems": 50, 1584 "items": { 1585 "type": "string", 1586 "maxLength": 128, 1587 "pattern": "^[a-zA-Z][0-9a-zA-Z+.-]*" 1588 } 1589 }, 1590 "routerMap": { 1591 "description": "Indicates the path of router navigation profile.", 1592 "type": "string", 1593 "pattern": "^[$]profile:[0-9a-zA-Z_.]+$", 1594 "maxLength": 255 1595 }, 1596 "appEnvironments": { 1597 "description": "Indicates the environment value of app.", 1598 "type": "array", 1599 "items": { 1600 "type": "object", 1601 "propertyNames": { 1602 "enum": [ 1603 "name", 1604 "value" 1605 ] 1606 }, 1607 "properties": { 1608 "name": { 1609 "description": "Indicates the key of a environment element. The value is a string with a maximum of 4096 bytes.", 1610 "type": "string", 1611 "maxLength": 4096 1612 }, 1613 "value": { 1614 "description": "Indicates the value of a environment element. The value is a string with a maximum of 4096 bytes.", 1615 "type": "string", 1616 "maxLength": 4096 1617 } 1618 } 1619 } 1620 }, 1621 "appStartup": { 1622 "description": "Startup framework configuration file. The value is startup framework configuration file path.", 1623 "type": "string", 1624 "pattern": "^[$]profile:[0-9a-zA-Z_.]+$", 1625 "maxLength": 255 1626 }, 1627 "hnpPackages": { 1628 "description": "Native package configuration file.", 1629 "type": "array", 1630 "minItems": 1, 1631 "items": { 1632 "type": "object", 1633 "propertyNames": { 1634 "enum": [ 1635 "package", 1636 "type" 1637 ] 1638 }, 1639 "required": [ 1640 "package", 1641 "type" 1642 ], 1643 "properties": { 1644 "package": { 1645 "description": "Indicates the file name of native package.", 1646 "type": "string", 1647 "pattern": "^([a-zA-Z0-9_-]+(\/[a-zA-Z0-9_-]+)*\/)?[a-zA-Z0-9_-]+\\.hnp$", 1648 "maxLength": 255 1649 }, 1650 "type": { 1651 "description": "Indicates the type of native package.", 1652 "type": "string", 1653 "enum": [ 1654 "public", 1655 "private" 1656 ] 1657 } 1658 } 1659 } 1660 } 1661 } 1662 } 1663 } 1664} 1665