1{ 2 "title": "JSON schema for HarmonyProfile.json", 3 "$schema": "http://json-schema.org/draft-07/schema#", 4 "type": "object", 5 "additionalProperties": true, 6 "required": [ 7 "app", 8 "deviceConfig", 9 "module" 10 ], 11 "propertyNames": { 12 "enum": [ 13 "app", 14 "deviceConfig", 15 "module" 16 ] 17 }, 18 "properties": { 19 "app": { 20 "description": "Indicates the global configuration of an application. Different .hap files of the same application must use the same app configuration.", 21 "type": "object", 22 "required": [ 23 "bundleName", 24 "version" 25 ], 26 "propertyNames": { 27 "enum": [ 28 "bundleName", 29 "vendor", 30 "version", 31 "apiVersion", 32 "smartWindowSize", 33 "smartWindowDeviceType" 34 ] 35 }, 36 "properties": { 37 "bundleName": { 38 "description": "Indicates the bundle name of the application. This label is a string type and cannot be defaulted. It uniquely identifies the application. 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 application name.This label cannot be left blank.", 39 "type": "string", 40 "maxLength": 128, 41 "minLength": 7, 42 "pattern": "^(([a-zA-Z]|[a-zA-Z][0-9a-zA-Z_]+)[.]([0-9a-zA-Z_.]+))|([{]([a-zA-Z]|[a-zA-Z][0-9a-zA-Z_]+)[}](.huawei.com))|[{](bundleName)[}]$" 43 }, 44 "vendor": { 45 "description": "Describes the application vendor. The value is a string with a maximum of 255 bytes. This label can be left blank by default.", 46 "type": "string", 47 "maxLength": 255 48 }, 49 "version": { 50 "description": "Indicates the version information of the application.Includes two sub-labels:”code” and ”name”.This label cannot be left blank.", 51 "type": "object", 52 "required": [ 53 "code", 54 "name" 55 ], 56 "propertyNames": { 57 "enum": [ 58 "code", 59 "name", 60 "minCompatibleVersionCode" 61 ] 62 }, 63 "properties": { 64 "code": { 65 "description": "Indicates the version number of the application. The value is an integer greater than 0. A larger value generally represents a later version.The system determines the application version based on the tag value.This label cannot be left blank.", 66 "type": "integer", 67 "minimum": 0, 68 "maximum": 2147483647 69 }, 70 "name": { 71 "description": "Indicates the text description of the application version.Used for displaying to users.A string can contain a maximum of 127 bytes.This label cannot be left blank.", 72 "type": "string", 73 "maxLength": 127, 74 "pattern": "^[0-9.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$" 75 }, 76 "minCompatibleVersionCode": { 77 "description": "This label identifies the earliest historical version compatible with the app pack, which is used for cross-device compatibility determination.This label is an integer and can be defaulted.", 78 "type": "integer", 79 "minimum": 0, 80 "maximum": 2147483647 81 } 82 } 83 }, 84 "apiVersion": { 85 "description": "This tag identifies the Harmony API version on which the application depends.", 86 "type": "object", 87 "propertyNames": { 88 "enum": [ 89 "compatible", 90 "target", 91 "releaseType" 92 ] 93 }, 94 "properties": { 95 "compatible": { 96 "description": "Indicates the minimum API version required for running an application. The value is an integer.", 97 "type": "integer", 98 "minimum": 0 99 }, 100 "target": { 101 "description": "This tag identifies the target API version required for application running. The value is an integer.", 102 "type": "integer", 103 "minimum": 0 104 }, 105 "releaseType": { 106 "description": "This tag identifies the type of the target API version required for application running. The tag is a string. The value can be CanaryN, BetaN, or Release, where N indicates an integer greater than 0.", 107 "type": "string", 108 "pattern": "^(Canary[1-9][0-9]+|Canary[1-9]|Beta[1-9][0-9]+|Beta[1-9]|Release)$" 109 } 110 } 111 }, 112 "smartWindowSize": { 113 "description": "Indicates the size of the simulation window. The value is a character string.", 114 "type": "string", 115 "pattern": "^([2-9][0-9]{2}|[1][0-9]{3}|2000)\\*([2-9][0-9]{2}|[1][0-9]{3}|2000)$" 116 }, 117 "smartWindowDeviceType": { 118 "description": "This label indicates the device on which the application is opened using the simulation window, a string array.", 119 "type": "array", 120 "items": { 121 "type": "string", 122 "enum": [ 123 "phone", 124 "tablet", 125 "tv" 126 ] 127 } 128 } 129 } 130 }, 131 "deviceConfig": { 132 "description": "Indicates the application configuration applied to a specific type of devices. When compiling and generating the HAP package, copy the device type configuration supported by the HAP package to the generated config file. The compilation is not required for the devices that are not supported by the HAP package.", 133 "type": "object", 134 "propertyNames": { 135 "enum": [ 136 "default", 137 "liteWearable", 138 "smartVision" 139 ] 140 }, 141 "properties": { 142 "default": { 143 "description": "The configuration in the default tag is applicable to all devices. If the configuration is different for other device types, you need to configure the configuration under the configuration tag of the device type.", 144 "type": "object", 145 "propertyNames": { 146 "enum": [ 147 "keepAlive" 148 ] 149 }, 150 "properties": { 151 "keepAlive": { 152 "description": "Specifies whether the application will keep alive.If this attribute is set to true, the application will start during the OS startup. If the application process exits, the OS will restart it. This attribute applies only to system applications.This attribute is not supported by basic watches.This label can be left blank by default.", 153 "type": "boolean" 154 } 155 } 156 }, 157 "liteWearable": { 158 "description": "", 159 "type": "object", 160 "propertyNames": { 161 "enum": [ 162 "keepAlive" 163 ] 164 }, 165 "properties": { 166 "keepAlive": { 167 "description": "Specifies whether the application will keep alive.If this attribute is set to true, the application will start during the OS startup. If the application process exits, the OS will restart it. This attribute applies only to system applications.This attribute is not supported by basic watches.This label can be left blank by default.", 168 "type": "boolean" 169 } 170 } 171 }, 172 "smartVision": { 173 "description": "", 174 "type": "object", 175 "propertyNames": { 176 "enum": [ 177 "keepAlive" 178 ] 179 }, 180 "properties": { 181 "keepAlive": { 182 "description": "Specifies whether the application will keep alive.If this attribute is set to true, the application will start during the OS startup. If the application process exits, the OS will restart it. This attribute applies only to system applications.This attribute is not supported by basic watches.This label can be left blank by default.", 183 "type": "boolean" 184 } 185 } 186 } 187 } 188 }, 189 "module": { 190 "description": "Indicates the configuration of a .hap file. The module configuration is valid only for the current .hap file.", 191 "type": "object", 192 "required": [ 193 "deviceType", 194 "distro" 195 ], 196 "propertyNames": { 197 "enum": [ 198 "description", 199 "abilities", 200 "js", 201 "reqPermissions", 202 "deviceType", 203 "distro", 204 "reqCapabilities", 205 "metaData", 206 "resizeable", 207 "distroFilter" 208 ] 209 }, 210 "properties": { 211 "description": { 212 "description": "Describes the .hap file. The value can be a string or a resource index to descriptions in multiple languages. A string can contain a maximum of 255 bytes. If the value exceeds 255 bytes, use the resource index.The tag can be left blank by default.", 213 "type": "string", 214 "maxLength": 255 215 }, 216 "deviceType": { 217 "description": "Indicates the type of devices on which the abilities can run. The value can be default, tv (smart TVs), wearable (smart watches), liteWearable (basic watches), smartVision, phone, car, tablet or any combination of these values.This label cannot be left blank.", 218 "type": "array", 219 "minItems": 1, 220 "uniqueItems": true, 221 "items": { 222 "type": "string", 223 "enum": [ 224 "car", 225 "liteWearable", 226 "smartVision", 227 "router" 228 ] 229 } 230 }, 231 "distro": { 232 "description": "Indicates the description of the current .hap file.This label cannot be left blank.", 233 "type": "object", 234 "propertyNames": { 235 "enum": [ 236 "deliveryWithInstall", 237 "moduleName", 238 "moduleType" 239 ] 240 }, 241 "required": [ 242 "deliveryWithInstall", 243 "moduleName", 244 "moduleType" 245 ], 246 "properties": { 247 "deliveryWithInstall": { 248 "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.", 249 "type": "boolean" 250 }, 251 "moduleName": { 252 "description": "Indicates the name of the current .hap file.This label cannot be left blank.", 253 "type": "string", 254 "maxLength": 31 255 }, 256 "moduleType": { 257 "description": "Indicates the type of the current .hap file. The value can be entry or feature.This label cannot be left blank.", 258 "type": "string", 259 "enum": [ 260 "entry", 261 "feature", 262 "har" 263 ] 264 } 265 } 266 }, 267 "abilities": { 268 "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.", 269 "type": "array", 270 "items": { 271 "type": "object", 272 "required": [ 273 "name", 274 "type" 275 ], 276 "propertyNames": { 277 "enum": [ 278 "name", 279 "description", 280 "icon", 281 "type", 282 "label", 283 "visible", 284 "deviceCapability", 285 "resizeable", 286 "srcLanguage", 287 "srcPath", 288 "metaData", 289 "skills" 290 ] 291 }, 292 "properties": { 293 "name": { 294 "description": "Indicates the name of the ability. The value is a reverse domain name, in the format of \"Complete bundle name.Class name\", for example, \"com.example.myapplication.MainAbility\", where com.example.myapplication indicates the bundle name and MainAbility indicates the class name. Alternatively, the value can start with a period (.) followed by the class name, for example, \".MainAbility\", which will be resolved into a complete name prefixed with the bundle name of the application.", 295 "type": "string", 296 "maxLength": 255 297 }, 298 "description": { 299 "description": "Describes the ability. The value can be a string or a resource index to descriptions in multiple languages.This label can be left blank by default.", 300 "type": "string", 301 "maxLength": 255 302 }, 303 "icon": { 304 "description": "Indicates the index to the ability icon file, in the format of \"$media:ability_icon\".This label can be left blank by default.", 305 "type": "string" 306 }, 307 "type": { 308 "description": "Indicates the template used by the ability. The value can be page, service, or provider.The \"page\" indicates FA developed using the Page template to provide the capability of interacting with users.The \"service\" indicates AA developed using the Service template to provide the capability of running tasks in the background.The \"provider\" indicates AA developed using the Data template to provide unified data access for external systems.This label cannot be left blank.", 309 "type": "string", 310 "enum": [ 311 "page", 312 "service", 313 "data", 314 "CA" 315 ] 316 }, 317 "label": { 318 "description": "Indicates the ability name visible to users. The tag value is set to the resource index of this name to support multiple languages.", 319 "type": "string", 320 "pattern": "^[$]string:[0-9a-zA-Z_.]+|(?=.*[{])(?=.*[}])[0-9a-zA-Z_.{}]+$", 321 "maxLength": 255 322 }, 323 "visible": { 324 "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.", 325 "type": "boolean" 326 }, 327 "deviceCapability": { 328 "description": "This label indicates the capability required by the device when the capability is running.", 329 "type": "array", 330 "maxItems": 512, 331 "uniqueItems": true, 332 "items": { 333 "type": "string", 334 "maxLength": 64 335 } 336 }, 337 "resizeable": { 338 "description": "Indicates whether the ability supports the multi-window feature.", 339 "type": "boolean" 340 }, 341 "srcLanguage": { 342 "description": "Type of the capability development language. The value can be java, js, or ets.The label cannot be defaulted.", 343 "type": "string", 344 "enum": [ 345 "java", 346 "js", 347 "ets" 348 ] 349 }, 350 "srcPath": { 351 "description": "This tag indicates the JS component code path corresponding to the ability. The tag value is a character string (a maximum of 127 bytes). When srcLanguage is set to js or ets, this tag cannot be defaulted.", 352 "type": "string", 353 "maxLength": 127 354 }, 355 "metaData": { 356 "description": "Indicates the metadata of the ability.", 357 "type": "object", 358 "propertyNames": { 359 "enum": [ 360 "parameters", 361 "results", 362 "customizeData" 363 ] 364 }, 365 "properties": { 366 "parameters": { 367 "description": "Indicates the metadata of the parameters to be passed for calling the ability. The metadata of each parameter consists of the description, name, and type sub-attributes.", 368 "type": "array", 369 "items": { 370 "type": "object", 371 "propertyNames": { 372 "enum": [ 373 "description", 374 "name", 375 "type" 376 ] 377 }, 378 "required": [ 379 "name", 380 "type" 381 ], 382 "properties": { 383 "name": { 384 "description": "Indicates the name of the parameter.", 385 "type": "string", 386 "maxLength": 255 387 }, 388 "type": { 389 "description": "Indicates the type of the parameter, for example, Integer.", 390 "type": "string" 391 }, 392 "description": { 393 "description": "Describes the parameter. The value can be a string or a resource index to descriptions in multiple languages.", 394 "type": "string", 395 "maxLength": 255 396 } 397 } 398 } 399 }, 400 "results": { 401 "description": "Indicates the metadata of the ability return value. The metadata of each return value consists of the description, name, and type sub-attributes.", 402 "type": "array", 403 "items": { 404 "type": "object", 405 "propertyNames": { 406 "enum": [ 407 "description", 408 "name", 409 "type" 410 ] 411 }, 412 "required": [ 413 "type" 414 ], 415 "properties": { 416 "name": { 417 "description": "Indicates the name of the return value.", 418 "type": "string", 419 "maxLength": 255 420 }, 421 "type": { 422 "description": "Indicates the type of the return value, for example, Integer.", 423 "type": "string" 424 }, 425 "description": { 426 "description": "Describes the return value. The value can be a string or a resource index to descriptions in multiple languages.", 427 "type": "string", 428 "maxLength": 255 429 } 430 } 431 } 432 }, 433 "customizeData": { 434 "description": "Indicates the custom metadata of the parent component. The parameters and results attributes are not configurable in the module tag.", 435 "type": "array", 436 "items": { 437 "type": "object", 438 "propertyNames": { 439 "enum": [ 440 "name", 441 "value", 442 "extra" 443 ] 444 }, 445 "properties": { 446 "name": { 447 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 448 "type": "string", 449 "maxLength": 255 450 }, 451 "value": { 452 "description": "Indicates the value of a data element. The value is a string with a maximum of 255 bytes.", 453 "type": "string", 454 "maxLength": 255 455 }, 456 "extra": { 457 "description": "Indicates the custom format of the data element. The value is an index to the resource that identifies the data.", 458 "type": "string" 459 } 460 } 461 } 462 } 463 } 464 }, 465 "skills": { 466 "description": "Indicates the types of the want that can be accepted by the ability.", 467 "type": "array", 468 "items": { 469 "type": "object", 470 "propertyNames": { 471 "enum": [ 472 "actions", 473 "entities", 474 "uris" 475 ] 476 }, 477 "properties": { 478 "actions": { 479 "description": "Indicates the actions of the want that can be accepted by the ability. The value can have one or multiple actions predefined in the system.", 480 "type": "array", 481 "items": { 482 "type": "string" 483 } 484 }, 485 "entities": { 486 "description": "Indicates the entities of the want 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.", 487 "type": "array", 488 "items": { 489 "type": "string" 490 } 491 }, 492 "uris": { 493 "description": "This tag identifies the collection of data specifications to be added to the want filter.", 494 "type": "array", 495 "items": { 496 "anyOf": [ 497 { 498 "type": "object", 499 "propertyNames": { 500 "enum": [ 501 "scheme", 502 "host", 503 "port", 504 "pathStartWith", 505 "path", 506 "pathRegx", 507 "type" 508 ] 509 }, 510 "required": [ 511 "scheme" 512 ], 513 "properties": { 514 "scheme": { 515 "description": "This label is a string type.", 516 "type": "string" 517 }, 518 "host": { 519 "description": "This label is a string type.", 520 "type": "string" 521 }, 522 "port": { 523 "description": "This label is a string type.", 524 "type": "string" 525 }, 526 "pathStartWith": { 527 "description": "This label is a string type.", 528 "type": "string" 529 }, 530 "path": { 531 "description": "This label is a string type.", 532 "type": "string" 533 }, 534 "pathRegx": { 535 "description": "This label is a string type.", 536 "type": "string" 537 }, 538 "type": { 539 "description": "This label is a string type.", 540 "type": "string" 541 } 542 } 543 }, 544 { 545 "type": "object", 546 "propertyNames": { 547 "enum": [ 548 "type" 549 ] 550 }, 551 "properties": { 552 "type": { 553 "description": "This label is a string type.", 554 "type": "string" 555 } 556 } 557 } 558 ] 559 } 560 } 561 } 562 } 563 } 564 } 565 } 566 }, 567 "js": { 568 "description": "Indicates a set of all modules developed using the JavaScript UI framework. Each element in the set represents the information about a JavaScript module.", 569 "type": "array", 570 "items": { 571 "type": "object", 572 "required": [ 573 "name", 574 "pages" 575 ], 576 "propertyNames": { 577 "enum": [ 578 "name", 579 "pages", 580 "window" 581 ] 582 }, 583 "properties": { 584 "name": { 585 "description": "Indicates the name of the JavaScript module.This label can be left blank by default.", 586 "type": "string" 587 }, 588 "pages": { 589 "description": "Describes the route information about all pages in the JavaScript module, including the page path and page name. The value is an array, in which each element represents a page. The first element in the array represents the home page of the JavaScript FA.", 590 "type": "array", 591 "minItems": 1, 592 "items": { 593 "type": "string" 594 } 595 }, 596 "window": { 597 "description": "Defines window-related configurations. This attribute is not supported by devices running the OHOS.", 598 "type": "object", 599 "propertyNames": { 600 "enum": [ 601 "designWidth", 602 "autoDesignWidth" 603 ] 604 }, 605 "properties": { 606 "designWidth": { 607 "description": "Indicates the baseline width for page design, in pixels. The size of an element is scaled by the actual device width. This label is an integer.", 608 "type": "integer", 609 "minimum": 0 610 }, 611 "autoDesignWidth": { 612 "description": "Specifies whether to automatically calculate the baseline width for page design. If it is set to true, the designWidth attribute becomes invalid. The baseline width is calculated based on the device width and screen density.", 613 "type": "boolean" 614 } 615 } 616 } 617 } 618 } 619 }, 620 "reqPermissions": { 621 "description": "Indicates the permissions that the application applies for from the system before its running.This label can be left blank by default.", 622 "type": "array", 623 "items": { 624 "type": "object", 625 "propertyNames": { 626 "enum": [ 627 "name", 628 "reason", 629 "usedScene" 630 ] 631 }, 632 "required": [ 633 "name" 634 ], 635 "properties": { 636 "name": { 637 "description": "Specifies the permission name to be used.", 638 "type": "string" 639 }, 640 "reason": { 641 "description": "Describe the reason for applying for the permission.", 642 "type": "string" 643 }, 644 "usedScene": { 645 "description": "This section describes the scenarios and timing of permission usage.", 646 "type": "object", 647 "propertyNames": { 648 "enum": [ 649 "ability", 650 "when" 651 ] 652 }, 653 "properties": { 654 "ability": { 655 "description": "This tag identifies the meta-capabilities that need the permission.", 656 "type": "array" 657 }, 658 "when": { 659 "description": "This tag identifies the time when the permission is used.", 660 "type": "string", 661 "enum": [ 662 "inuse", 663 "always" 664 ] 665 } 666 } 667 } 668 } 669 } 670 }, 671 "reqCapabilities": { 672 "description": "Indicates the device capabilities required to run the application. The value is an array of strings, each of which represents a device capability. Device capabilities are defined by the device OS.", 673 "type": "array", 674 "items": { 675 "type": "string" 676 } 677 }, 678 "resizeable": { 679 "description": "Indicates whether the application supports the multi-window feature.", 680 "type": "boolean" 681 }, 682 "distroFilter": { 683 "description": "This tag is used for precise matching during cloud distribution in the AppGallery and defines the HAP distribution policy.", 684 "type": "object", 685 "propertyNames": { 686 "enum": [ 687 "apiVersion", 688 "screenShape", 689 "screenWindow", 690 "screenDensity", 691 "countryCode" 692 ] 693 }, 694 "properties": { 695 "apiVersion": { 696 "description": "Indicates the supported apiVersion range. The value can be 3, 4, or 5. This label is optional.", 697 "type": "object", 698 "propertyNames": { 699 "enum": [ 700 "policy", 701 "value" 702 ] 703 }, 704 "required": [ 705 "policy", 706 "value" 707 ], 708 "properties": { 709 "policy": { 710 "description": "The policy tag indicates the list rule of the value of the sublabel. Either exclude or include can be used.", 711 "type": "string", 712 "enum": [ 713 "include", 714 "exclude" 715 ] 716 }, 717 "value": { 718 "description": "Indicates the value range of the sublabel.", 719 "type": "array", 720 "items": { 721 "type": "integer", 722 "minimum": 3 723 }, 724 "uniqueItems": true 725 } 726 } 727 }, 728 "screenShape": { 729 "description": "Indicates the screen shape enumeration. The value can be circle or rect, indicating a circle or rectangle screen.", 730 "type": "object", 731 "propertyNames": { 732 "enum": [ 733 "policy", 734 "value" 735 ] 736 }, 737 "required": [ 738 "policy", 739 "value" 740 ], 741 "properties": { 742 "policy": { 743 "description": "The policy tag indicates the list rule of the value of the sublabel. Either exclude or include can be used.", 744 "type": "string", 745 "enum": [ 746 "include", 747 "exclude" 748 ] 749 }, 750 "value": { 751 "description": "Indicates the value range of the sublabel.", 752 "type": "array", 753 "items": { 754 "type": "string", 755 "enum": [ 756 "circle", 757 "rect" 758 ] 759 }, 760 "uniqueItems": true 761 } 762 } 763 }, 764 "screenWindow": { 765 "description": "Indicates the resolution of the window when the application is running. This parameter can be configured only for liteWearable devices. This field is optional. If this field is configured, the value must be valid. The tag value type is a string array.", 766 "type": "object", 767 "propertyNames": { 768 "enum": [ 769 "policy", 770 "value" 771 ] 772 }, 773 "required": [ 774 "policy", 775 "value" 776 ], 777 "properties": { 778 "policy": { 779 "description": "The policy tag indicates the list rule of the value of the sublabel. Either exclude or include can be used.", 780 "type": "string", 781 "enum": [ 782 "include" 783 ] 784 }, 785 "value": { 786 "description": "Indicates the value range of the sublabel.", 787 "type": "array", 788 "items": { 789 "type": "string", 790 "pattern": "^([1-9][0-9]*)\\*([1-9][0-9]*)$" 791 }, 792 "uniqueItems": true 793 } 794 } 795 }, 796 "screenDensity": { 797 "description": "This label indicates the pixel density of the screen (dpi: Dots Per Inch). This field is optional. If this field is configured, the value must be valid. The tag value is a string array.", 798 "type": "object", 799 "propertyNames": { 800 "enum": [ 801 "policy", 802 "value" 803 ] 804 }, 805 "required": [ 806 "policy", 807 "value" 808 ], 809 "properties": { 810 "policy": { 811 "description": "The policy tag indicates the list rule of the value of the sublabel. Either exclude or include can be used.", 812 "type": "string", 813 "enum": [ 814 "include", 815 "exclude" 816 ] 817 }, 818 "value": { 819 "description": "Indicates the value range of the sublabel.", 820 "type": "array", 821 "items": { 822 "type": "string", 823 "enum": [ 824 "sdpi", 825 "mdpi", 826 "ldpi", 827 "xldpi", 828 "xxldpi", 829 "xxxldpi" 830 ] 831 }, 832 "uniqueItems": true 833 } 834 } 835 }, 836 "countryCode": { 837 "description": "This label indicates the country code to be distributed to the application. The specific value is subject to the ISO-3166 -1 standard. Multiple country and region enumeration definitions are supported. This field is optional. If this field is configured, the value must be valid. The tag value is astring array. The substring indicates the supported country or region and consists of two uppercase letters.", 838 "type": "object", 839 "propertyNames": { 840 "enum": [ 841 "policy", 842 "value" 843 ] 844 }, 845 "required": [ 846 "policy", 847 "value" 848 ], 849 "properties": { 850 "policy": { 851 "description": "The policy tag indicates the list rule of the value of the sublabel. Either exclude or include can be used.", 852 "type": "string", 853 "enum": [ 854 "include", 855 "exclude" 856 ] 857 }, 858 "value": { 859 "description": "Indicates the value range of the sublabel.", 860 "type": "array", 861 "items": { 862 "type": "string" 863 }, 864 "uniqueItems": true 865 } 866 } 867 } 868 } 869 }, 870 "metaData": { 871 "description": "Indicates the metadata of the ability.", 872 "type": "object", 873 "propertyNames": { 874 "enum": [ 875 "parameters", 876 "results", 877 "customizeData" 878 ] 879 }, 880 "properties": { 881 "parameters": { 882 "description": "Indicates the metadata of the parameters to be passed for calling the ability. The metadata of each parameter consists of the description, name, and type sub-attributes.", 883 "type": "array", 884 "items": { 885 "type": "object", 886 "propertyNames": { 887 "enum": [ 888 "description", 889 "name", 890 "type" 891 ] 892 }, 893 "required": [ 894 "name", 895 "type" 896 ], 897 "properties": { 898 "name": { 899 "description": "Indicates the name of the parameter.", 900 "type": "string", 901 "maxLength": 255 902 }, 903 "type": { 904 "description": "Indicates the type of the parameter, for example, Integer.", 905 "type": "string" 906 }, 907 "description": { 908 "description": "Describes the parameter. The value can be a string or a resource index to descriptions in multiple languages.", 909 "type": "string", 910 "maxLength": 255 911 } 912 } 913 } 914 }, 915 "results": { 916 "description": "Indicates the metadata of the ability return value. The metadata of each return value consists of the description, name, and type sub-attributes.", 917 "type": "array", 918 "items": { 919 "type": "object", 920 "propertyNames": { 921 "enum": [ 922 "description", 923 "name", 924 "type" 925 ] 926 }, 927 "required": [ 928 "type" 929 ], 930 "properties": { 931 "name": { 932 "description": "Indicates the name of the return value.", 933 "type": "string", 934 "maxLength": 255 935 }, 936 "type": { 937 "description": "Indicates the type of the return value, for example, Integer.", 938 "type": "string" 939 }, 940 "description": { 941 "description": "Describes the return value. The value can be a string or a resource index to descriptions in multiple languages.", 942 "type": "string", 943 "maxLength": 255 944 } 945 } 946 } 947 }, 948 "customizeData": { 949 "description": "Indicates the custom metadata of the parent component. The parameters and results attributes are not configurable in the module tag.", 950 "type": "array", 951 "items": { 952 "type": "object", 953 "propertyNames": { 954 "enum": [ 955 "name", 956 "value", 957 "extra" 958 ] 959 }, 960 "properties": { 961 "name": { 962 "description": "Indicates the key of a data element. The value is a string with a maximum of 255 bytes.", 963 "type": "string", 964 "maxLength": 255 965 }, 966 "value": { 967 "description": "Indicates the value of a data element. The value is a string with a maximum of 255 bytes.", 968 "type": "string", 969 "maxLength": 255 970 }, 971 "extra": { 972 "description": "Indicates the custom format of the data element. The value is an index to the resource that identifies the data.", 973 "type": "string" 974 } 975 } 976 } 977 } 978 } 979 } 980 }, 981 "if": { 982 "properties": { 983 "distro": { 984 "properties": { 985 "moduleType": { 986 "const": "feature" 987 } 988 } 989 } 990 } 991 }, 992 "then": { 993 "propertyNames": { 994 "enum": [ 995 "description", 996 "abilities", 997 "js", 998 "reqPermissions", 999 "deviceType", 1000 "distro", 1001 "reqCapabilities", 1002 "metaData", 1003 "resizeable" 1004 ] 1005 } 1006 } 1007 } 1008 } 1009} 1010