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