{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "definitions": {
    "CalculatedPropertiesSpecification": {
      "additionalProperties": false,
      "description": "This content modifier allows including additional calculated properties into the content.",
      "properties": {
        "categoryId": {
          "anyOf": [
            {
              "$ref": "#/definitions/ParentCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/RootCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/IdCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/SchemaCategoryIdentifier"
            },
            {
              "type": "string"
            }
          ],
          "description": "The attribute allows moving the calculated property into a different category."
        },
        "editor": {
          "$ref": "#/definitions/PropertyEditorSpecification",
          "description": "Custom property editor specification that allows assigning\na custom value editor to be used in UI."
        },
        "extendedData": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of ECExpressions whose\nevaluation results are used as extended data values.",
          "type": "object"
        },
        "label": {
          "description": "Specifies label of the calculated property. Supports localization.",
          "type": "string"
        },
        "priority": {
          "description": "Assign a custom `Field.priority` to the property. It's up to the UI component to make sure that priority\nis respected - properties with higher priority should appear before or above properties with lower priority.",
          "type": "integer"
        },
        "renderer": {
          "$ref": "#/definitions/CustomRendererSpecification",
          "description": "Custom property renderer specification that allows assigning a\ncustom value renderer to be used in UI. The specification is used to set up `Field.renderer` for\nthis property and it's up to the UI component to make sure appropriate renderer is used to render the property."
        },
        "type": {
          "description": "Specifies return type of the calculated property. If unsupported type is provided, calculated property won't appear in the property pane.\n\nType can have these values: `string`, `boolean`, `bool`, `dateTime`, `double`, `int`, `long`",
          "enum": [
            "bool",
            "boolean",
            "dateTime",
            "double",
            "int",
            "long",
            "string"
          ],
          "type": "string"
        },
        "value": {
          "description": "Defines an expression to calculate the value. The expression can use ECInstance\nand Ruleset Variables symbol contexts.",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "type": "object"
    },
    "ChildNodeRule": {
      "additionalProperties": false,
      "description": "Child node rules are used to define child nodes in a hierarchy.",
      "properties": {
        "condition": {
          "description": "Defines a condition which needs to be met in order for the rule to be used. The condition is an\nECExpression which has to evaluate\nto a boolean value.",
          "type": "string"
        },
        "customizationRules": {
          "description": "A list of customization rules that\napply only to nodes produced by this rule.",
          "items": {
            "$ref": "#/definitions/CustomizationRule"
          },
          "type": "array"
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "ChildNodes"
          ],
          "type": "string"
        },
        "specifications": {
          "description": "A list of hierarchy specifications that define what nodes are going to be returned.",
          "items": {
            "$ref": "#/definitions/ChildNodeSpecification"
          },
          "type": "array"
        },
        "stopFurtherProcessing": {
          "description": "Stop processing rules that have lower priority. Used in cases when recursion suppression is needed.",
          "type": "boolean"
        },
        "subConditions": {
          "description": "A list of sub-rules which share *placement attributes* and\nnested customization rules\nof the hierarchy rule. This means the attributes of hierarchy rule are still in effect and the sub-rules\ncan add additional condition of their own.",
          "items": {
            "$ref": "#/definitions/SubCondition"
          },
          "type": "array"
        }
      },
      "required": [
        "ruleType"
      ],
      "type": "object"
    },
    "ChildNodeSpecification": {
      "anyOf": [
        {
          "$ref": "#/definitions/CustomNodeSpecification"
        },
        {
          "$ref": "#/definitions/CustomQueryInstanceNodesSpecification"
        },
        {
          "$ref": "#/definitions/InstanceNodesOfSpecificClassesSpecification"
        },
        {
          "$ref": "#/definitions/RelatedInstanceNodesSpecification"
        }
      ],
      "description": "Hierarchy rule specifications that define what nodes are going to be returned by the rule."
    },
    "ClassGroup": {
      "additionalProperties": false,
      "description": "Base class grouping allows grouping ECInstance nodes by their base class (as opposed to the hierarchy\nspecifications' `groupByClass` attribute, which always groups by direct class).",
      "properties": {
        "baseClass": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "Specification of the base ECClass to group by. If specified, allows grouping by a subclass of the class\nspecified by rule's `class` attribute."
        },
        "createGroupForSingleItem": {
          "description": "Specifies whether a grouping node should be created if there is only one item in that group.",
          "type": "boolean"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "Class"
          ],
          "type": "string"
        }
      },
      "required": [
        "specType"
      ],
      "type": "object"
    },
    "ContentInstancesOfSpecificClassesSpecification": {
      "additionalProperties": false,
      "description": "This specification creates content for all instances of specific ECClasses.",
      "properties": {
        "calculatedProperties": {
          "description": "Specifications of calculated properties whose values are\ngenerated using provided ECExpressions.",
          "items": {
            "$ref": "#/definitions/CalculatedPropertiesSpecification"
          },
          "type": "array"
        },
        "classes": {
          "anyOf": [
            {
              "$ref": "#/definitions/MultiSchemaClassesSpecification"
            },
            {
              "items": {
                "$ref": "#/definitions/MultiSchemaClassesSpecification"
              },
              "type": "array"
            }
          ],
          "description": "Defines a set of multi schema classes that specify which\nECClasses need to be selected to form the result."
        },
        "excludedClasses": {
          "anyOf": [
            {
              "$ref": "#/definitions/MultiSchemaClassesSpecification"
            },
            {
              "items": {
                "$ref": "#/definitions/MultiSchemaClassesSpecification"
              },
              "type": "array"
            }
          ],
          "description": "Defines a set of multi schema classes that prevents specified\nECClasses and subclasses from being selected by `classes` attribute."
        },
        "handlePropertiesPolymorphically": {
          "description": "Specifies whether properties of derived `classes` should be included in the content.",
          "type": "boolean"
        },
        "instanceFilter": {
          "description": "Specifies an ECExpression for filtering instances\nof ECClasses specified through the `classes` attribute.",
          "type": "string"
        },
        "onlyIfNotHandled": {
          "description": "Specifies whether this specification should be ignored if another specification was handled before as\ndetermined by rule and specification priorities. This provides a mechanism for defining a fallback specification.",
          "type": "boolean"
        },
        "priority": {
          "description": "Controls the order in which specifications are handled — specification with higher priority value is handled\nfirst. If priorities are equal, the specifications are handled in the order they appear in the ruleset.",
          "type": "integer"
        },
        "propertyCategories": {
          "description": "Specifications for custom categories. Simply defining the categories does\nnothing - they have to be referenced from property specification defined in\n`propertyOverrides` by `id`.",
          "items": {
            "$ref": "#/definitions/PropertyCategorySpecification"
          },
          "type": "array"
        },
        "propertyOverrides": {
          "description": "Specifications for various property overrides that allow customizing property display.",
          "items": {
            "$ref": "#/definitions/PropertySpecification"
          },
          "type": "array"
        },
        "relatedInstances": {
          "description": "Specifications of related instances that can be used when creating the content.",
          "items": {
            "$ref": "#/definitions/RelatedInstanceSpecification"
          },
          "type": "array"
        },
        "relatedProperties": {
          "description": "Specifications of related properties which are\nincluded in the generated content.",
          "items": {
            "$ref": "#/definitions/RelatedPropertiesSpecification"
          },
          "type": "array"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "ContentInstancesOfSpecificClasses"
          ],
          "type": "string"
        }
      },
      "required": [
        "classes",
        "specType"
      ],
      "type": "object"
    },
    "ContentModifier": {
      "additionalProperties": false,
      "description": "Content modifiers are used to modify how instances of specified ECClasses are displayed in content which is\nproduced using content rules. They do not produce any content\nby themselves.",
      "properties": {
        "applyOnNestedContent": {
          "description": "Specifies whether `calculatedProperties` and\n`relatedProperties` specifications should also be applied on\nnested content.",
          "type": "boolean"
        },
        "calculatedProperties": {
          "description": "Specifications of calculated properties whose values are\ngenerated using provided ECExpressions.",
          "items": {
            "$ref": "#/definitions/CalculatedPropertiesSpecification"
          },
          "type": "array"
        },
        "class": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "Specification of ECClass whose content should be modified. The modifier is applied to all content\nif this attribute is not specified."
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "propertyCategories": {
          "description": "Specifications for custom categories. Simply defining the categories does\nnothing - they have to be referenced from property specification defined in\n`propertyOverrides` by `id`.",
          "items": {
            "$ref": "#/definitions/PropertyCategorySpecification"
          },
          "type": "array"
        },
        "propertyOverrides": {
          "description": "Specifications for various property overrides that allow customizing property display.",
          "items": {
            "$ref": "#/definitions/PropertySpecification"
          },
          "type": "array"
        },
        "relatedProperties": {
          "description": "Specifications of related properties which are\nincluded in the generated content.",
          "items": {
            "$ref": "#/definitions/RelatedPropertiesSpecification"
          },
          "type": "array"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "ContentModifier"
          ],
          "type": "string"
        }
      },
      "required": [
        "ruleType"
      ],
      "type": "object"
    },
    "ContentRelatedInstancesSpecification": {
      "additionalProperties": false,
      "description": "Returns content for instances related to the selected (input) instances.",
      "properties": {
        "calculatedProperties": {
          "description": "Specifications of calculated properties whose values are\ngenerated using provided ECExpressions.",
          "items": {
            "$ref": "#/definitions/CalculatedPropertiesSpecification"
          },
          "type": "array"
        },
        "instanceFilter": {
          "description": "Specifies an ECExpression for filtering instances\nof ECClasses targeted through the `relationshipPaths` attribute.",
          "type": "string"
        },
        "onlyIfNotHandled": {
          "description": "Specifies whether this specification should be ignored if another specification was handled before as\ndetermined by rule and specification priorities. This provides a mechanism for defining a fallback specification.",
          "type": "boolean"
        },
        "priority": {
          "description": "Controls the order in which specifications are handled — specification with higher priority value is handled\nfirst. If priorities are equal, the specifications are handled in the order they appear in the ruleset.",
          "type": "integer"
        },
        "propertyCategories": {
          "description": "Specifications for custom categories. Simply defining the categories does\nnothing - they have to be referenced from property specification defined in\n`propertyOverrides` by `id`.",
          "items": {
            "$ref": "#/definitions/PropertyCategorySpecification"
          },
          "type": "array"
        },
        "propertyOverrides": {
          "description": "Specifications for various property overrides that allow customizing property display.",
          "items": {
            "$ref": "#/definitions/PropertySpecification"
          },
          "type": "array"
        },
        "relatedInstances": {
          "description": "Specifications of related instances that can be used when creating the content.",
          "items": {
            "$ref": "#/definitions/RelatedInstanceSpecification"
          },
          "type": "array"
        },
        "relatedProperties": {
          "description": "Specifications of related properties which are\nincluded in the generated content.",
          "items": {
            "$ref": "#/definitions/RelatedPropertiesSpecification"
          },
          "type": "array"
        },
        "relationshipPaths": {
          "description": "Specifies a chain of relationship path specifications that\nforms a path from an input instance to the output instances. When this array is empty, the specification produces no results.",
          "items": {
            "$ref": "#/definitions/RepeatableRelationshipPathSpecification"
          },
          "type": "array"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "ContentRelatedInstances"
          ],
          "type": "string"
        }
      },
      "required": [
        "relationshipPaths",
        "specType"
      ],
      "type": "object"
    },
    "ContentRule": {
      "additionalProperties": false,
      "description": "Content rules are used to define content that is displayed for specific type of input.\nInput consists of either ECInstances or nodes and to make things\nsimpler everything is considered a node - instances get converted to\n*ECInstance nodes* (thus the `SelectedNode` symbol in `condition` ECExpression).",
      "properties": {
        "condition": {
          "description": "Defines a condition which needs to be met in order for the rule to be used. The condition is an\nECExpression which has to evaluate to\na boolean value.",
          "type": "string"
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "Content"
          ],
          "type": "string"
        },
        "specifications": {
          "description": "A list of content specifications that define what content is going to be returned. This is the most\nimportant attribute which is responsible for defining what instances' properties are included in the\nreturned content.",
          "items": {
            "$ref": "#/definitions/ContentSpecification"
          },
          "type": "array"
        }
      },
      "required": [
        "ruleType",
        "specifications"
      ],
      "type": "object"
    },
    "ContentSpecification": {
      "anyOf": [
        {
          "$ref": "#/definitions/ContentRelatedInstancesSpecification"
        },
        {
          "$ref": "#/definitions/ContentInstancesOfSpecificClassesSpecification"
        },
        {
          "$ref": "#/definitions/SelectedNodeInstancesSpecification"
        }
      ],
      "description": "Content rule specifications which define what content is returned\nwhen rule is used."
    },
    "CustomNodeSpecification": {
      "additionalProperties": false,
      "description": "Returns a static custom-defined node that's not based on an ECInstance.",
      "properties": {
        "description": {
          "description": "Specifies the value of `Node.description` property, which is a string that may\nbe localized. UI component displaying the node may choose\nwhether and how to surface this information to users.",
          "type": "string"
        },
        "doNotSort": {
          "description": "Suppress sorting of nodes returned by this specification. With this attribute set to `true`, the order\nof returned nodes is undefined.",
          "type": "boolean"
        },
        "hasChildren": {
          "description": "This attribute allows telling the engine that nodes created by this specification always or never have children.",
          "enum": [
            "Always",
            "Never",
            "Unknown"
          ],
          "type": "string"
        },
        "hideExpression": {
          "description": "When specified ECExpression evaluates\nto `true`, nodes produced by this specification are omitted and their children appear one hierarchy level\nhigher.",
          "type": "string"
        },
        "hideIfNoChildren": {
          "description": "Specifies whether nodes created through this specification should be hidden if they have no child nodes.",
          "type": "boolean"
        },
        "hideNodesInHierarchy": {
          "description": "When `true`, instances nodes produced by this specification are omitted and their children appear one\nhierarchy level higher.",
          "type": "boolean"
        },
        "imageId": {
          "deprecated": "in 5.x - will not be removed until after 2026-06-13. Use `ExtendedDataRule` instead. See extended data usage page for more details.",
          "description": "Specifies node's image ID. If set, the ID is assigned to `Node.imageId` and it's\nup to the UI component to decide what to do with it.",
          "type": "string"
        },
        "label": {
          "description": "Specifies node label. This is a string value that may be localized.",
          "type": "string"
        },
        "nestedRules": {
          "description": "Specifications of nested child node rules that\nallow creating child nodes without the need of supplying a condition to match the parent node.",
          "items": {
            "$ref": "#/definitions/ChildNodeRule"
          },
          "type": "array"
        },
        "priority": {
          "description": "Controls the order in which specifications are handled — specification with higher priority value is\nhandled first. If priorities are equal, the specifications are handled in the order they appear in the\nruleset.",
          "type": "integer"
        },
        "relatedInstances": {
          "description": "Specifications of related instances that can be used\nwhen creating the nodes.",
          "items": {
            "$ref": "#/definitions/RelatedInstanceSpecification"
          },
          "type": "array"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "CustomNode"
          ],
          "type": "string"
        },
        "suppressSimilarAncestorsCheck": {
          "description": "Specifies whether similar ancestor nodes' checking should be suppressed when creating nodes based on this\nspecification. See more in infinite hierarchies prevention page.",
          "type": "boolean"
        },
        "type": {
          "description": "Specifies node type, which is assigned to node's key.",
          "type": "string"
        }
      },
      "required": [
        "label",
        "specType",
        "type"
      ],
      "type": "object"
    },
    "CustomQueryInstanceNodesSpecification": {
      "additionalProperties": false,
      "description": "Returns nodes for instances returned by a provided ECSQL query.",
      "properties": {
        "doNotSort": {
          "description": "Suppress sorting of nodes returned by this specification. With this attribute set to `true`, the order\nof returned nodes is undefined.",
          "type": "boolean"
        },
        "groupByClass": {
          "description": "Controls whether returned instances should be grouped by ECClass. Defaults to `true`.",
          "type": "boolean"
        },
        "groupByLabel": {
          "description": "Controls whether returned instances should be grouped by label. Defaults to `true`.",
          "type": "boolean"
        },
        "hasChildren": {
          "description": "This attribute allows telling the engine that nodes created by this specification always or never have children.",
          "enum": [
            "Always",
            "Never",
            "Unknown"
          ],
          "type": "string"
        },
        "hideExpression": {
          "description": "When specified ECExpression evaluates\nto `true`, nodes produced by this specification are omitted and their children appear one hierarchy level\nhigher.",
          "type": "string"
        },
        "hideIfNoChildren": {
          "description": "Specifies whether nodes created through this specification should be hidden if they have no child nodes.",
          "type": "boolean"
        },
        "hideNodesInHierarchy": {
          "description": "When `true`, instances nodes produced by this specification are omitted and their children appear one\nhierarchy level higher.",
          "type": "boolean"
        },
        "nestedRules": {
          "description": "Specifications of nested child node rules that\nallow creating child nodes without the need of supplying a condition to match the parent node.",
          "items": {
            "$ref": "#/definitions/ChildNodeRule"
          },
          "type": "array"
        },
        "priority": {
          "description": "Controls the order in which specifications are handled — specification with higher priority value is\nhandled first. If priorities are equal, the specifications are handled in the order they appear in the\nruleset.",
          "type": "integer"
        },
        "queries": {
          "description": "Specifications of queries used to create the content. Query specifications define the actual\nresults of the specification.",
          "items": {
            "$ref": "#/definitions/QuerySpecification"
          },
          "type": "array"
        },
        "relatedInstances": {
          "description": "Specifications of related instances that can be used\nwhen creating the nodes.",
          "items": {
            "$ref": "#/definitions/RelatedInstanceSpecification"
          },
          "type": "array"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "CustomQueryInstanceNodes"
          ],
          "type": "string"
        },
        "suppressSimilarAncestorsCheck": {
          "description": "Specifies whether similar ancestor nodes' checking should be suppressed when creating nodes based on this\nspecification. See more in infinite hierarchies prevention page.",
          "type": "boolean"
        }
      },
      "required": [
        "specType"
      ],
      "type": "object"
    },
    "CustomRendererSpecification": {
      "additionalProperties": false,
      "description": "This specification allows defining a custom renderer, which can be used to render properties or categories.",
      "properties": {
        "rendererName": {
          "description": "Name of the renderer that's going to be used in UI components. Value of this attribute corresponds\nto `RendererDescription.name` attribute that gets assigned to whatever the renderer\nis set on.",
          "type": "string"
        }
      },
      "required": [
        "rendererName"
      ],
      "type": "object"
    },
    "CustomizationRule": {
      "anyOf": [
        {
          "$ref": "#/definitions/NodeArtifactsRule"
        },
        {
          "$ref": "#/definitions/ExtendedDataRule"
        },
        {
          "$ref": "#/definitions/GroupingRule"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverride"
        },
        {
          "$ref": "#/definitions/PropertySortingRule"
        },
        {
          "$ref": "#/definitions/DisabledSortingRule"
        }
      ],
      "description": "Customization rules allow customizing each node or content item separately.\nMost of the rules have a `condition` property which uses ECExpressions\nfor conditional rule filtering.\n\n**Nested customization rules:**\n\nCustomization rules may be specified at ruleset level, in which case they're\napplied to all content produced by the ruleset, or nested under navigation rules,\nin which case they're applied only for nodes created by those rules.\n\n**Customization rule priorities:**\n\nCustomization rules have a `priority` attribute which defines the order in which they're applied. If priorities match,\nrules engine looks at the nesting level - the deeper the rule is nested, the higher is its `priority`.\nIf the nesting levels also match, the rule defined first wins."
    },
    "DefaultPropertyCategoryOverride": {
      "additionalProperties": false,
      "description": "A rule that allows overriding the default property category.\n\nThe default property category is a category that gets assigned to properties that otherwise have no category.",
      "properties": {
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "DefaultPropertyCategoryOverride"
          ],
          "type": "string"
        },
        "specification": {
          "$ref": "#/definitions/PropertyCategorySpecification",
          "description": "Specification for the custom property category."
        }
      },
      "required": [
        "ruleType",
        "specification"
      ],
      "type": "object"
    },
    "DisabledSortingRule": {
      "additionalProperties": false,
      "description": "Rule to disable sorting for certain ECInstances in the hierarchy and/or content.",
      "properties": {
        "class": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "Specifies ECClass whose ECInstances should be sorted."
        },
        "condition": {
          "description": "Defines a condition which needs to be met in order for the rule to be used. The condition is an\nECExpression which has to\nevaluate to a boolean value.",
          "type": "string"
        },
        "isPolymorphic": {
          "description": "Specifies that `class` attribute defined in this rule should be handled polymorphically.",
          "type": "boolean"
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "DisabledSorting"
          ],
          "type": "string"
        }
      },
      "required": [
        "ruleType"
      ],
      "type": "object"
    },
    "ECPropertyValueQuerySpecification": {
      "additionalProperties": false,
      "description": "The specification specifies the name of the parent node instance property whose value is the ECSQL\nused to query for instances.",
      "properties": {
        "class": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "Specification of ECClass whose instances the query returns. The specification may also point to a\nbase class of instances returned by the query. If the query returns instances that are not of this\nclass, they aren't included in the result set."
        },
        "parentPropertyName": {
          "description": "Specifies name of the parent instance property whose value contains the ECSQL query.",
          "type": "string"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "ECPropertyValue"
          ],
          "type": "string"
        }
      },
      "required": [
        "class",
        "parentPropertyName",
        "specType"
      ],
      "type": "object"
    },
    "ExtendedDataRule": {
      "additionalProperties": false,
      "description": "Extended data rule is used to inject some arbitrary data into presentation data objects (nodes, content records).",
      "properties": {
        "condition": {
          "description": "Defines a condition which needs to be met in order for the rule to be used. The condition\nis an ECExpression which has\nto evaluate to a boolean value.",
          "type": "string"
        },
        "items": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of ECExpressions whose\nevaluation results are used as extended data values.",
          "type": "object"
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "ExtendedData"
          ],
          "type": "string"
        }
      },
      "required": [
        "items",
        "ruleType"
      ],
      "type": "object"
    },
    "GroupingRule": {
      "additionalProperties": false,
      "description": "Grouping rules provide advanced ways to group instances when creating hierarchies.",
      "properties": {
        "class": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "Specification of ECClass which should be grouped using this rule."
        },
        "condition": {
          "description": "An ECExpression that results in\na boolean value. If specified,  the grouping rule applies only to instance nodes that cause the condition\nto evaluate to `true`.",
          "type": "string"
        },
        "groups": {
          "description": "Specifies a list of grouping specifications\nwhich describe the kind of grouping that should be applied.",
          "items": {
            "$ref": "#/definitions/GroupingSpecification"
          },
          "type": "array"
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "Grouping"
          ],
          "type": "string"
        }
      },
      "required": [
        "class",
        "groups",
        "ruleType"
      ],
      "type": "object"
    },
    "GroupingSpecification": {
      "anyOf": [
        {
          "$ref": "#/definitions/ClassGroup"
        },
        {
          "$ref": "#/definitions/PropertyGroup"
        },
        {
          "$ref": "#/definitions/SameLabelInstanceGroup"
        }
      ],
      "description": "Grouping rule specifications."
    },
    "IdCategoryIdentifier": {
      "additionalProperties": false,
      "description": "Identifier of a category specified through `PropertyCategorySpecification` in this scope.",
      "properties": {
        "categoryId": {
          "description": "ID of the category pointed to by this identifier",
          "type": "string"
        },
        "createClassCategory": {
          "description": "Controls whether a class category should be included under the category pointed to by this identifier",
          "type": "boolean"
        },
        "type": {
          "description": "Type of the identifier",
          "enum": [
            "Id"
          ],
          "type": "string"
        }
      },
      "required": [
        "categoryId",
        "type"
      ],
      "type": "object"
    },
    "InstanceLabelOverride": {
      "additionalProperties": false,
      "description": "Instance label override rule provides a way to set instance label to one of its property values,\nother attributes and/or combination of them.",
      "properties": {
        "class": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "Specifies the ECClass to apply this rule to."
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "InstanceLabelOverride"
          ],
          "type": "string"
        },
        "values": {
          "description": "Specifications of values used to override label. The first non-empty value is used as the actual label.",
          "items": {
            "$ref": "#/definitions/InstanceLabelOverrideValueSpecification"
          },
          "type": "array"
        }
      },
      "required": [
        "class",
        "ruleType",
        "values"
      ],
      "type": "object"
    },
    "InstanceLabelOverrideBriefcaseIdSpecification": {
      "additionalProperties": false,
      "description": "Specification returns ECInstance's briefcase ID in base36 format.",
      "properties": {
        "specType": {
          "description": "Type of the specification",
          "enum": [
            "BriefcaseId"
          ],
          "type": "string"
        }
      },
      "required": [
        "specType"
      ],
      "type": "object"
    },
    "InstanceLabelOverrideClassLabelSpecification": {
      "additionalProperties": false,
      "description": "Specification uses ECClass display label as the label content.",
      "properties": {
        "specType": {
          "description": "Type of the specification",
          "enum": [
            "ClassLabel"
          ],
          "type": "string"
        }
      },
      "required": [
        "specType"
      ],
      "type": "object"
    },
    "InstanceLabelOverrideClassNameSpecification": {
      "additionalProperties": false,
      "description": "Specification uses ECClass name as the label content.",
      "properties": {
        "full": {
          "description": "Should full (`{schemaName}.{className}`) class name be used",
          "type": "boolean"
        },
        "specType": {
          "description": "Type of the specification",
          "enum": [
            "ClassName"
          ],
          "type": "string"
        }
      },
      "required": [
        "specType"
      ],
      "type": "object"
    },
    "InstanceLabelOverrideCompositeValueSpecification": {
      "additionalProperties": false,
      "description": "Specification allows creating a label value composited using multiple other specifications.",
      "properties": {
        "parts": {
          "description": "Parts of the value.\n\nIf any of the parts with `isRequired` flag evaluate to an empty string, the\nresult of this specification is also an empty string.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "isRequired": {
                "type": "boolean"
              },
              "spec": {
                "$ref": "#/definitions/InstanceLabelOverrideValueSpecification"
              }
            },
            "required": [
              "spec"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "separator": {
          "description": "Separator to use when joining the parts. Defaults to a space character.",
          "type": "string"
        },
        "specType": {
          "description": "Type of the specification",
          "enum": [
            "Composite"
          ],
          "type": "string"
        }
      },
      "required": [
        "parts",
        "specType"
      ],
      "type": "object"
    },
    "InstanceLabelOverrideLocalIdSpecification": {
      "additionalProperties": false,
      "description": "Specification returns ECInstance's local ID in base36 format.",
      "properties": {
        "specType": {
          "description": "Type of the specification",
          "enum": [
            "LocalId"
          ],
          "type": "string"
        }
      },
      "required": [
        "specType"
      ],
      "type": "object"
    },
    "InstanceLabelOverridePropertyValueSpecification": {
      "additionalProperties": false,
      "description": "Specification uses property value as the label content.",
      "properties": {
        "propertyName": {
          "description": "Name of the property whose value should be used.",
          "type": "string"
        },
        "propertySource": {
          "anyOf": [
            {
              "$ref": "#/definitions/RelationshipStepSpecification"
            },
            {
              "items": {
                "$ref": "#/definitions/RelationshipStepSpecification"
              },
              "type": "array"
            }
          ],
          "description": "Specification of the relationship path from `InstanceLabelOverride.class`\nto class of the property. If omitted, `InstanceLabelOverride.class` is used as property class."
        },
        "specType": {
          "description": "Type of the specification",
          "enum": [
            "Property"
          ],
          "type": "string"
        }
      },
      "required": [
        "propertyName",
        "specType"
      ],
      "type": "object"
    },
    "InstanceLabelOverrideRelatedInstanceLabelSpecification": {
      "additionalProperties": false,
      "description": "Specification uses label of another related instance as the label content.",
      "properties": {
        "pathToRelatedInstance": {
          "$ref": "#/definitions/RelationshipPathSpecification",
          "description": "Specification of the relationship path from `InstanceLabelOverride.class`\nto class of the related instance."
        },
        "specType": {
          "description": "Type of the specification",
          "enum": [
            "RelatedInstanceLabel"
          ],
          "type": "string"
        }
      },
      "required": [
        "pathToRelatedInstance",
        "specType"
      ],
      "type": "object"
    },
    "InstanceLabelOverrideStringValueSpecification": {
      "additionalProperties": false,
      "description": "Specification uses the specified value as the label content.",
      "properties": {
        "specType": {
          "description": "Type of the specification",
          "enum": [
            "String"
          ],
          "type": "string"
        },
        "value": {
          "description": "The value to use as the label content.",
          "type": "string"
        }
      },
      "required": [
        "specType",
        "value"
      ],
      "type": "object"
    },
    "InstanceLabelOverrideValueSpecification": {
      "anyOf": [
        {
          "$ref": "#/definitions/InstanceLabelOverrideCompositeValueSpecification"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverridePropertyValueSpecification"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverrideStringValueSpecification"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverrideClassNameSpecification"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverrideClassLabelSpecification"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverrideBriefcaseIdSpecification"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverrideLocalIdSpecification"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverrideRelatedInstanceLabelSpecification"
        }
      ],
      "description": "Specification to define how the label for `InstanceLabelOverride` should be created."
    },
    "InstanceNodesOfSpecificClassesSpecification": {
      "additionalProperties": false,
      "description": "Returns nodes for instances of specific ECClasses.",
      "properties": {
        "classes": {
          "anyOf": [
            {
              "$ref": "#/definitions/MultiSchemaClassesSpecification"
            },
            {
              "items": {
                "$ref": "#/definitions/MultiSchemaClassesSpecification"
              },
              "type": "array"
            }
          ],
          "description": "Defines a set of multi schema classes that\nspecify which ECClasses need to be selected to form the result."
        },
        "doNotSort": {
          "description": "Suppress sorting of nodes returned by this specification. With this attribute set to `true`, the order\nof returned nodes is undefined.",
          "type": "boolean"
        },
        "excludedClasses": {
          "anyOf": [
            {
              "$ref": "#/definitions/MultiSchemaClassesSpecification"
            },
            {
              "items": {
                "$ref": "#/definitions/MultiSchemaClassesSpecification"
              },
              "type": "array"
            }
          ],
          "description": "Defines a set of multi schema classes that\nprevents specified ECClasses and subclasses from being selected by `classes` attribute."
        },
        "groupByClass": {
          "description": "Controls whether returned instances should be grouped by ECClass. Defaults to `true`.",
          "type": "boolean"
        },
        "groupByLabel": {
          "description": "Controls whether returned instances should be grouped by label. Defaults to `true`.",
          "type": "boolean"
        },
        "hasChildren": {
          "description": "This attribute allows telling the engine that nodes created by this specification always or never have children.",
          "enum": [
            "Always",
            "Never",
            "Unknown"
          ],
          "type": "string"
        },
        "hideExpression": {
          "description": "When specified ECExpression evaluates\nto `true`, nodes produced by this specification are omitted and their children appear one hierarchy level\nhigher.",
          "type": "string"
        },
        "hideIfNoChildren": {
          "description": "Specifies whether nodes created through this specification should be hidden if they have no child nodes.",
          "type": "boolean"
        },
        "hideNodesInHierarchy": {
          "description": "When `true`, instances nodes produced by this specification are omitted and their children appear one\nhierarchy level higher.",
          "type": "boolean"
        },
        "instanceFilter": {
          "description": "Specifies an ECExpression for filtering\ninstances of ECClasses specified through the `classes` attribute.",
          "type": "string"
        },
        "nestedRules": {
          "description": "Specifications of nested child node rules that\nallow creating child nodes without the need of supplying a condition to match the parent node.",
          "items": {
            "$ref": "#/definitions/ChildNodeRule"
          },
          "type": "array"
        },
        "priority": {
          "description": "Controls the order in which specifications are handled — specification with higher priority value is\nhandled first. If priorities are equal, the specifications are handled in the order they appear in the\nruleset.",
          "type": "integer"
        },
        "relatedInstances": {
          "description": "Specifications of related instances that can be used\nwhen creating the nodes.",
          "items": {
            "$ref": "#/definitions/RelatedInstanceSpecification"
          },
          "type": "array"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "InstanceNodesOfSpecificClasses"
          ],
          "type": "string"
        },
        "suppressSimilarAncestorsCheck": {
          "description": "Specifies whether similar ancestor nodes' checking should be suppressed when creating nodes based on this\nspecification. See more in infinite hierarchies prevention page.",
          "type": "boolean"
        }
      },
      "required": [
        "classes",
        "specType"
      ],
      "type": "object"
    },
    "MultiSchemaClassesSpecification": {
      "additionalProperties": false,
      "description": "This specification lists ECClasses which should be targeted when creating content or hierarchy nodes.",
      "properties": {
        "arePolymorphic": {
          "description": "Defines whether the derived ECClasses should be included in the result.",
          "type": "boolean"
        },
        "classNames": {
          "description": "An array of target ECClass names.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "schemaName": {
          "description": "Specifies the schema which contains the target classes.",
          "pattern": "^[\\w\\d]+$",
          "type": "string"
        }
      },
      "required": [
        "classNames",
        "schemaName"
      ],
      "type": "object"
    },
    "NoCategoryIdentifier": {
      "additionalProperties": false,
      "description": "Identifier for no category. Used to make category displayed at root level by using\nthis identifier for `PropertyCategorySpecification.parentId`.",
      "properties": {
        "type": {
          "description": "Type of the identifier",
          "enum": [
            "None"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "NodeArtifactsRule": {
      "additionalProperties": false,
      "description": "Node artifacts rules are used to create and assign artifacts to specific nodes. The artifacts can be\naccessed when evaluating parent node's `hideExpression` to decide whether it should be hidden or not.",
      "properties": {
        "condition": {
          "description": "Specifies an ECExpression that\nallows applying node artifacts based on evaluation result, e.g. by some property of the parent node.",
          "type": "string"
        },
        "items": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of ECExpressions whose evaluation results\nare used as artifact values.",
          "type": "object"
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "NodeArtifacts"
          ],
          "type": "string"
        }
      },
      "required": [
        "items",
        "ruleType"
      ],
      "type": "object"
    },
    "ParentCategoryIdentifier": {
      "additionalProperties": false,
      "description": "Identifier of the default parent category.\n\nFor direct properties it's the default category. See `DefaultPropertyCategoryOverride` for overriding the default category.\n\nFor related properties it's the category made up from the related ECClass defined by the last\n`RelatedPropertiesSpecification` with `RelationshipMeaning.RelatedInstance`. If there's no such specification,\nthe default category is used.",
      "properties": {
        "type": {
          "description": "Type of the identifier",
          "enum": [
            "DefaultParent"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "PropertyCategorySpecification": {
      "additionalProperties": false,
      "description": "Content modifier for defining custom property categories. Custom categories are not present in the result unless\nthey contain at least one property. One way to assign a property to the category is by using\nproperty overrides.",
      "properties": {
        "autoExpand": {
          "description": "Controls the value of `CategoryDescription.expand` which tells the UI component\ndisplaying the category to auto-expand the category.",
          "type": "boolean"
        },
        "description": {
          "description": "Extensive description of the category. The description is assigned to the category object that's set\non content fields and it's up to UI component to decide how the description is displayed.",
          "type": "string"
        },
        "id": {
          "description": "Category identifier used to reference the category definition from property overrides or other category\ndefinitions. The identifier has to be unique within the list of category definitions where this\nspecification is used.",
          "type": "string"
        },
        "label": {
          "description": "Display label of the category. May be localized.",
          "type": "string"
        },
        "parentId": {
          "anyOf": [
            {
              "$ref": "#/definitions/NoCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/ParentCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/RootCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/IdCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/SchemaCategoryIdentifier"
            },
            {
              "type": "string"
            }
          ],
          "description": "Identifier of a parent category. When specifying the parent category by ID, it has to be available in\nthe scope of this category definition."
        },
        "priority": {
          "description": "Assign a custom `CategoryDescription.priority` to the category. It's up to the\nUI component to make sure that priority is respected - categories with higher priority should appear\nbefore or above categories with lower priority.",
          "type": "integer"
        },
        "renderer": {
          "$ref": "#/definitions/CustomRendererSpecification",
          "description": "Custom category renderer specification that allows\nassigning a custom category renderer to be used in UI. This specification is used to set up\n`CategoryDescription.renderer` for this category and it's up to the UI component to\nmake sure appropriate renderer is used to render the category."
        }
      },
      "required": [
        "id",
        "label"
      ],
      "type": "object"
    },
    "PropertyEditorJsonParameters": {
      "additionalProperties": false,
      "description": "Arbitrary JSON parameters for custom property editors",
      "properties": {
        "json": {
          "description": "Arbitrary JSON that can be handled by a property editor"
        },
        "paramsType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "Json"
          ],
          "type": "string"
        }
      },
      "required": [
        "json",
        "paramsType"
      ],
      "type": "object"
    },
    "PropertyEditorMultilineParameters": {
      "additionalProperties": false,
      "description": "Multiline parameters for property editors that support multiline display",
      "properties": {
        "height": {
          "description": "Number of lines. Defaults to `1`.",
          "minimum": 1,
          "type": "integer"
        },
        "paramsType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "Multiline"
          ],
          "type": "string"
        }
      },
      "required": [
        "paramsType"
      ],
      "type": "object"
    },
    "PropertyEditorParameters": {
      "anyOf": [
        {
          "$ref": "#/definitions/PropertyEditorJsonParameters"
        },
        {
          "$ref": "#/definitions/PropertyEditorMultilineParameters"
        },
        {
          "$ref": "#/definitions/PropertyEditorRangeParameters"
        },
        {
          "$ref": "#/definitions/PropertyEditorSliderParameters"
        }
      ],
      "description": "Parameters for `PropertyEditorSpecification`"
    },
    "PropertyEditorRangeParameters": {
      "additionalProperties": false,
      "description": "Range parameters for property editors that support ranges",
      "properties": {
        "max": {
          "description": "Maximum value of the range.",
          "type": "number"
        },
        "min": {
          "description": "Minimum value of the range.",
          "type": "number"
        },
        "paramsType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "Range"
          ],
          "type": "string"
        }
      },
      "required": [
        "paramsType"
      ],
      "type": "object"
    },
    "PropertyEditorSliderParameters": {
      "additionalProperties": false,
      "description": "Slider parameters for property editors that support slider display",
      "properties": {
        "intervalsCount": {
          "description": "Count of intervals. Defaults to `1`.",
          "minimum": 1,
          "type": "integer"
        },
        "isVertical": {
          "description": "Is slider vertical.",
          "type": "boolean"
        },
        "max": {
          "description": "Maximum value that can be set.",
          "type": "number"
        },
        "min": {
          "description": "Minimum value that can be set.",
          "type": "number"
        },
        "paramsType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "Slider"
          ],
          "type": "string"
        }
      },
      "required": [
        "max",
        "min",
        "paramsType"
      ],
      "type": "object"
    },
    "PropertyEditorSpecification": {
      "additionalProperties": false,
      "description": "This specification allows assigning a custom property editor to specific properties.",
      "properties": {
        "editorName": {
          "description": "Name of the property editor that's going to be used in UI components. This name is carried over to\n`Field.editor` and it's up to the UI component to make sure appropriate editor\nis used to edit the property.",
          "type": "string"
        },
        "parameters": {
          "description": "Parameters for the editor.",
          "items": {
            "$ref": "#/definitions/PropertyEditorParameters"
          },
          "type": "array"
        }
      },
      "required": [
        "editorName"
      ],
      "type": "object"
    },
    "PropertyGroup": {
      "additionalProperties": false,
      "description": "Property grouping allows grouping by a property of the instance by value or by given ranges of values.",
      "properties": {
        "createGroupForSingleItem": {
          "description": "Specifies whether a grouping node should be created if there is only one item in that group.",
          "type": "boolean"
        },
        "createGroupForUnspecifiedValues": {
          "description": "Should a separate grouping node be created for nodes whose grouping value is not set or is set to an empty string.",
          "type": "boolean"
        },
        "imageId": {
          "deprecated": "in 5.x - will not be removed until after 2026-06-13. Use `ExtendedDataRule` instead. See extended data usage page for more details.",
          "description": "Specifies grouping node's image ID. If set, the ID is assigned to `Node.imageId` and\nit's up to the UI component to decide what to do with it.",
          "minLength": 1,
          "type": "string"
        },
        "propertyName": {
          "description": "Name of the ECProperty which is used for grouping. The property must exist on the ECClass specified by the\nrule's `class` attribute and it must be of either a primitive or a navigation type.",
          "minLength": 1,
          "type": "string"
        },
        "ranges": {
          "description": "Ranges into which the grouping values are divided. Instances are grouped by value if no ranges are specified.",
          "items": {
            "$ref": "#/definitions/PropertyRangeGroupSpecification"
          },
          "type": "array"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "Property"
          ],
          "type": "string"
        }
      },
      "required": [
        "propertyName",
        "specType"
      ],
      "type": "object"
    },
    "PropertyRangeGroupSpecification": {
      "additionalProperties": false,
      "description": "Describes a grouping range.",
      "properties": {
        "fromValue": {
          "description": "Value that defines the range start (inclusive).",
          "minLength": 1,
          "type": "string"
        },
        "imageId": {
          "deprecated": "in 5.x - will not be removed until after 2026-06-13. Use `ExtendedDataRule` instead. See extended data usage page for more details.",
          "description": "ID of an image to use for the grouping node. Defaults to `PropertyGroup.imageId` specified in `PropertyGroup`.",
          "minLength": 1,
          "type": "string"
        },
        "label": {
          "description": "Grouping node label. May be localized.\nDefaults to `{from value} - {to value}`.",
          "minLength": 1,
          "type": "string"
        },
        "toValue": {
          "description": "Value that defines the range end (inclusive).",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "fromValue",
        "toValue"
      ],
      "type": "object"
    },
    "PropertySortingRule": {
      "additionalProperties": false,
      "description": "Rule to configure sorting for certain ECInstances in the hierarchy and/or content. It is possible to configure different sorting for different types of ECInstances.",
      "properties": {
        "class": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "Specifies ECClass whose ECInstances should be sorted."
        },
        "condition": {
          "description": "Defines a condition which needs to be met in order for the rule to be used. The condition is an\nECExpression which has to\nevaluate to a boolean value.",
          "type": "string"
        },
        "isPolymorphic": {
          "description": "Specifies that `class` attribute defined in this rule should be handled polymorphically.",
          "type": "boolean"
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "propertyName": {
          "description": "Specifies name of the property which should be used for sorting.",
          "minLength": 1,
          "type": "string"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "PropertySorting"
          ],
          "type": "string"
        },
        "sortAscending": {
          "description": "Specifies whether instances should be sorted in ascending order or descending.",
          "type": "boolean"
        }
      },
      "required": [
        "propertyName",
        "ruleType"
      ],
      "type": "object"
    },
    "PropertySpecification": {
      "additionalProperties": false,
      "description": "This specification allows overriding some attributes of specific ECProperty or define how it's displayed.",
      "properties": {
        "categoryId": {
          "anyOf": [
            {
              "$ref": "#/definitions/ParentCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/RootCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/IdCategoryIdentifier"
            },
            {
              "$ref": "#/definitions/SchemaCategoryIdentifier"
            },
            {
              "type": "string"
            }
          ],
          "description": "The attribute allows moving the property into a different category."
        },
        "doNotHideOtherPropertiesOnDisplayOverride": {
          "description": "This attribute controls whether making the property visible using `isDisplayed` attribute should automatically hide\nall other properties of the same class. When `true`, this behavior is disabled.",
          "type": "boolean"
        },
        "editor": {
          "$ref": "#/definitions/PropertyEditorSpecification",
          "description": "Custom property editor specification that allows assigning\na custom value editor to be used in UI."
        },
        "isDisplayed": {
          "description": "This attribute controls whether the particular property is present in the result, even when it is marked as hidden in the\nECSchema. The allowed settings are:\n\n- Omitted or `undefined`: property visibility is controlled by the ECSchema.\n\n- `true`: property is made visible. Warning: this will automatically hide all other properties of the same class.\n  If this behavior is not desirable, set `doNotHideOtherPropertiesOnDisplayOverride` attribute to `true`.\n\n- `false`: property is made hidden.\n\nThe value can also be set using an ECExpression.",
          "type": [
            "string",
            "boolean"
          ]
        },
        "isReadOnly": {
          "description": "This attribute controls whether the property field is read-only. If the attribute value is not set, the field is\nread-only when at least one of the properties is read-only.",
          "type": "boolean"
        },
        "labelOverride": {
          "description": "This is an attribute that allows overriding the property label. May be localized.",
          "type": "string"
        },
        "name": {
          "description": "Name of the ECProperty to apply overrides to. A `\"*\"` may be specified to match all properties in current context.\nThe current context is determined based on where the override is specified:\n\n- When used in a content modifier, the\n  properties of the ECClass specified by the `class` attribute are used.\n\n- When used in one of the content specifications,\n  properties produced by that specification are used.",
          "type": "string"
        },
        "overridesPriority": {
          "description": "There may be multiple property specifications that apply to a single property and there may be conflicts between\ndifferent attributes. The `overridesPriority` attribute is here to help solve the problem - if multiple specifications\nattempt to override the same attribute, the override of specification with highest `overridesPriority` value is used.\nThe order of overrides from specification with the same `overridesPriority` is defined by the order they appear in\nthe overrides list.",
          "type": "number"
        },
        "priority": {
          "description": "This attribute controls the order in which property fields should be displayed. Property fields with higher priority\nwill appear before property fields with lower priority. If the attribute value is not set, the field's priority\nwill be the maximum priority of its properties.",
          "type": "number"
        },
        "renderer": {
          "$ref": "#/definitions/CustomRendererSpecification",
          "description": "Custom property renderer specification that allows assigning a\ncustom value renderer to be used in UI. The specification is used to set up `Field.renderer` for\nthis property and it's up to the UI component to make sure appropriate renderer is used to render the property."
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "QuerySpecification": {
      "anyOf": [
        {
          "$ref": "#/definitions/StringQuerySpecification"
        },
        {
          "$ref": "#/definitions/ECPropertyValueQuerySpecification"
        }
      ],
      "description": "Query specifications used in `CustomQueryInstanceNodesSpecification`."
    },
    "RelatedInstanceByPathSpecification": {
      "additionalProperties": false,
      "description": "A type of `RelatedInstanceSpecification` that joins related instances by a relationship path.",
      "properties": {
        "alias": {
          "description": "Specifies an an alias that given to the related instance. The alias can be used to reference the\ninstance in instance filter and customization rules.",
          "pattern": "^\\w[\\w\\d]*$",
          "type": "string"
        },
        "isRequired": {
          "description": "Specifies whether to omit the primary instance from the result if the other end of `relationshipPath`\ndoes not yield any related instances.",
          "type": "boolean"
        },
        "relationshipPath": {
          "$ref": "#/definitions/RelationshipPathSpecification",
          "description": "Specifies a chain of relationship path specifications\nthat forms a path from the primary instance to the related instances."
        }
      },
      "required": [
        "alias",
        "relationshipPath"
      ],
      "type": "object"
    },
    "RelatedInstanceByTargetInstancesSpecification": {
      "additionalProperties": false,
      "description": "A type of `RelatedInstanceSpecification` that joins related instances by target class and instance IDs.",
      "properties": {
        "alias": {
          "description": "Specifies an an alias that given to the related instance. The alias can be used to reference the\ninstance in instance filter and customization rules.",
          "pattern": "^\\w[\\w\\d]*$",
          "type": "string"
        },
        "isRequired": {
          "description": "Specifies whether to omit the primary instance from the result if the other end of `relationshipPath`\ndoes not yield any related instances.",
          "type": "boolean"
        },
        "targetInstances": {
          "additionalProperties": false,
          "description": "Specifies target class and a list of target ECInstance IDs.",
          "properties": {
            "class": {
              "$ref": "#/definitions/SingleSchemaClassSpecification",
              "description": "Specification for the target class to join."
            },
            "instanceIds": {
              "description": "Ids of the target instances to join.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "class",
            "instanceIds"
          ],
          "type": "object"
        }
      },
      "required": [
        "alias",
        "targetInstances"
      ],
      "type": "object"
    },
    "RelatedInstanceNodesSpecification": {
      "additionalProperties": false,
      "description": "Produces ECInstance nodes that are related to some source ECInstance. The source instance is determined\nby traversing the hierarchy upwards until an ECInstance node is encountered.",
      "properties": {
        "doNotSort": {
          "description": "Suppress sorting of nodes returned by this specification. With this attribute set to `true`, the order\nof returned nodes is undefined.",
          "type": "boolean"
        },
        "groupByClass": {
          "description": "Controls whether returned instances should be grouped by ECClass. Defaults to `true`.",
          "type": "boolean"
        },
        "groupByLabel": {
          "description": "Controls whether returned instances should be grouped by label. Defaults to `true`.",
          "type": "boolean"
        },
        "hasChildren": {
          "description": "This attribute allows telling the engine that nodes created by this specification always or never have children.",
          "enum": [
            "Always",
            "Never",
            "Unknown"
          ],
          "type": "string"
        },
        "hideExpression": {
          "description": "When specified ECExpression evaluates\nto `true`, nodes produced by this specification are omitted and their children appear one hierarchy level\nhigher.",
          "type": "string"
        },
        "hideIfNoChildren": {
          "description": "Specifies whether nodes created through this specification should be hidden if they have no child nodes.",
          "type": "boolean"
        },
        "hideNodesInHierarchy": {
          "description": "When `true`, instances nodes produced by this specification are omitted and their children appear one\nhierarchy level higher.",
          "type": "boolean"
        },
        "instanceFilter": {
          "description": "Specifies an ECExpression for filtering\ninstances of ECClasses targeted through the `relationshipPaths` attribute.",
          "type": "string"
        },
        "nestedRules": {
          "description": "Specifications of nested child node rules that\nallow creating child nodes without the need of supplying a condition to match the parent node.",
          "items": {
            "$ref": "#/definitions/ChildNodeRule"
          },
          "type": "array"
        },
        "priority": {
          "description": "Controls the order in which specifications are handled — specification with higher priority value is\nhandled first. If priorities are equal, the specifications are handled in the order they appear in the\nruleset.",
          "type": "integer"
        },
        "relatedInstances": {
          "description": "Specifications of related instances that can be used\nwhen creating the nodes.",
          "items": {
            "$ref": "#/definitions/RelatedInstanceSpecification"
          },
          "type": "array"
        },
        "relationshipPaths": {
          "description": "Specifies a chain of relationship path specifications\nthat forms a path from a source instance to the output instances. When this array is empty, the specification produces\nno results.",
          "items": {
            "$ref": "#/definitions/RepeatableRelationshipPathSpecification"
          },
          "type": "array"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "RelatedInstanceNodes"
          ],
          "type": "string"
        },
        "suppressSimilarAncestorsCheck": {
          "description": "Specifies whether similar ancestor nodes' checking should be suppressed when creating nodes based on this\nspecification. See more in infinite hierarchies prevention page.",
          "type": "boolean"
        }
      },
      "required": [
        "relationshipPaths",
        "specType"
      ],
      "type": "object"
    },
    "RelatedInstanceSpecification": {
      "anyOf": [
        {
          "$ref": "#/definitions/RelatedInstanceByPathSpecification"
        },
        {
          "$ref": "#/definitions/RelatedInstanceByTargetInstancesSpecification"
        }
      ],
      "description": "Related instance specification is used in content\nand hierarchy specifications to \"join\" the\nprimary instance with its related instance and allow using the related instance for filtering, customization and grouping."
    },
    "RelatedPropertiesSpecification": {
      "additionalProperties": false,
      "description": "This specification allows including related instance properties into the content.",
      "properties": {
        "autoExpand": {
          "description": "Should the field containing related properties be assigned the `NestedContentField.autoExpand`\nattribute. The attribute tells UI components showing the properties that they should be initially displayed in the expanded state.",
          "type": "boolean"
        },
        "forceCreateRelationshipCategory": {
          "description": "Specifies whether a relationship category should be created regardless of whether any relationship properties were included.",
          "type": "boolean"
        },
        "handleTargetClassPolymorphically": {
          "description": "The attribute tells whether the target class specified through `propertiesSource` should be handled\npolymorphically. This means properties of the concrete class are loaded in addition to properties of the\ntarget class itself.",
          "type": "boolean"
        },
        "instanceFilter": {
          "description": "Condition for filtering instances targeted by the `propertiesSource` attribute.\n\nSee: ECExpressions available in instance filter",
          "type": "string"
        },
        "nestedRelatedProperties": {
          "description": "The attribute allows loading additional related properties that are related to the target instance of this specification.",
          "items": {
            "$ref": "#/definitions/RelatedPropertiesSpecification"
          },
          "type": "array"
        },
        "properties": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PropertySpecification"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "type": "array"
            },
            {
              "enum": [
                "*",
                "_none_"
              ],
              "type": "string"
            }
          ],
          "description": "List of names or definitions of related class properties that should be included in the content."
        },
        "propertiesSource": {
          "$ref": "#/definitions/RelationshipPathSpecification",
          "description": "Specifies a chain of relationship path specifications that\nforms a path from the content instance to the related instance(s) whose properties should additionally be loaded."
        },
        "relationshipMeaning": {
          "description": "The attribute describes what the related properties mean to the primary instance\nwhose properties are displayed.",
          "enum": [
            "RelatedInstance",
            "SameInstance"
          ],
          "type": "string"
        },
        "relationshipProperties": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PropertySpecification"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "type": "array"
            },
            {
              "enum": [
                "*",
                "_none_"
              ],
              "type": "string"
            }
          ],
          "description": "List of names or definitions of relationship class properties that should be included in the content."
        },
        "skipIfDuplicate": {
          "description": "Specifies whether the specification should be ignored if another higher priority specification for the same relationship already exists.",
          "type": "boolean"
        }
      },
      "required": [
        "propertiesSource"
      ],
      "type": "object"
    },
    "RelationshipPathSpecification": {
      "anyOf": [
        {
          "$ref": "#/definitions/RelationshipStepSpecification"
        },
        {
          "items": {
            "$ref": "#/definitions/RelationshipStepSpecification"
          },
          "type": "array"
        }
      ],
      "description": "Relationship path specification is used to define a relationship path to an ECClass."
    },
    "RelationshipStepSpecification": {
      "additionalProperties": false,
      "description": "Specification of a single step in `RelationshipPathSpecification`.",
      "properties": {
        "direction": {
          "description": "This attribute specifies the direction in which the `relationship` should be followed.",
          "enum": [
            "Backward",
            "Forward"
          ],
          "type": "string"
        },
        "relationship": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "This attribute specifies the ECRelationship that should be used to traverse to target class."
        },
        "targetClass": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "This attribute may be used to specialize the target of the relationship."
        }
      },
      "required": [
        "direction",
        "relationship"
      ],
      "type": "object"
    },
    "RepeatableRelationshipPathSpecification": {
      "anyOf": [
        {
          "$ref": "#/definitions/RepeatableRelationshipStepSpecification"
        },
        {
          "items": {
            "$ref": "#/definitions/RepeatableRelationshipStepSpecification"
          },
          "type": "array"
        }
      ],
      "description": "This specification declares a step in a relationship path between a source and target ECInstances. A step\ncan optionally be repeated a number of times to traverse the same relationship recursively. Multiple\nspecifications of this type can be chained together to express complex indirect relationships."
    },
    "RepeatableRelationshipStepSpecification": {
      "additionalProperties": false,
      "description": "Specification of a single step in `RepeatableRelationshipPathSpecification`.",
      "properties": {
        "count": {
          "anyOf": [
            {
              "enum": [
                "*"
              ],
              "type": "string"
            },
            {
              "type": "number"
            }
          ],
          "description": "When a number is specified, the relationship is traversed recursively the specified number of times.\n\nWhen it is set to a special value `\"*\"`, the same relationship is traversed recursively unbounded number\nof times, starting from zero (the relationship is not followed). On each traversal iteration, Presentation\nrules engine accumulates all indirectly related ECInstances as defined by the remaining relationship path."
        },
        "direction": {
          "description": "This attribute specifies the direction in which the `relationship` should be followed.",
          "enum": [
            "Backward",
            "Forward"
          ],
          "type": "string"
        },
        "relationship": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "This attribute specifies the ECRelationship that should be used to traverse to target class."
        },
        "targetClass": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "This attribute may be used to specialize the target of the relationship."
        }
      },
      "required": [
        "direction",
        "relationship"
      ],
      "type": "object"
    },
    "RequiredSchemaSpecification": {
      "additionalProperties": false,
      "description": "This specification is designed for specifying schema requirements for the `Ruleset` or specific\npresentation rules.",
      "properties": {
        "maxVersion": {
          "description": "Maximum allowed schema version (exclusive).\nFormat: `{read version}.{write version}.{minor version}`, e.g. `2.1.15`.",
          "pattern": "^[\\d]+\\.[\\d]+\\.[\\d]+$",
          "type": "string"
        },
        "minVersion": {
          "description": "Minimum required schema version (inclusive).\nFormat: `{read version}.{write version}.{minor version}`, e.g. `2.1.15`.",
          "pattern": "^[\\d]+\\.[\\d]+\\.[\\d]+$",
          "type": "string"
        },
        "name": {
          "description": "Specifies the schema to whom the requirement is being set.",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "RootCategoryIdentifier": {
      "additionalProperties": false,
      "description": "Identifier of the root category.\n\nFor direct properties it's the default category. See `DefaultPropertyCategoryOverride` for overriding the default category.\n\nFor related properties it's the category made up from the related ECClass defined by the first\n`RelatedPropertiesSpecification` with `RelationshipMeaning.RelatedInstance`. If there's no such specification,\nthe default category is used.",
      "properties": {
        "type": {
          "description": "Type of the identifier",
          "enum": [
            "Root"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "RootNodeRule": {
      "additionalProperties": false,
      "description": "Root node rules are used to define nodes that are displayed at the root hierarchy level.",
      "properties": {
        "autoExpand": {
          "description": "Tells the library to assign produced nodes a flag, indicating that they should be automatically expanded.",
          "type": "boolean"
        },
        "condition": {
          "description": "Defines a condition which needs to be met in order for the rule to be used. The condition is an\nECExpression which has to evaluate\nto a boolean value.",
          "type": "string"
        },
        "customizationRules": {
          "description": "A list of customization rules that\napply only to nodes produced by this rule.",
          "items": {
            "$ref": "#/definitions/CustomizationRule"
          },
          "type": "array"
        },
        "onlyIfNotHandled": {
          "description": "Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\npriorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.",
          "type": "boolean"
        },
        "priority": {
          "description": "Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\nequal, the rules are handled in the order they're defined.",
          "type": "integer"
        },
        "requiredSchemas": {
          "description": "A list of ECSchema requirements that need to be met for the rule to be used.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "ruleType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "RootNodes"
          ],
          "type": "string"
        },
        "specifications": {
          "description": "A list of hierarchy specifications that define what nodes are going to be returned.",
          "items": {
            "$ref": "#/definitions/ChildNodeSpecification"
          },
          "type": "array"
        },
        "stopFurtherProcessing": {
          "description": "Stop processing rules that have lower priority. Used in cases when recursion suppression is needed.",
          "type": "boolean"
        },
        "subConditions": {
          "description": "A list of sub-rules which share *placement attributes* and\nnested customization rules\nof the hierarchy rule. This means the attributes of hierarchy rule are still in effect and the sub-rules\ncan add additional condition of their own.",
          "items": {
            "$ref": "#/definitions/SubCondition"
          },
          "type": "array"
        }
      },
      "required": [
        "ruleType"
      ],
      "type": "object"
    },
    "Rule": {
      "anyOf": [
        {
          "$ref": "#/definitions/ContentRule"
        },
        {
          "$ref": "#/definitions/DefaultPropertyCategoryOverride"
        },
        {
          "$ref": "#/definitions/NodeArtifactsRule"
        },
        {
          "$ref": "#/definitions/ExtendedDataRule"
        },
        {
          "$ref": "#/definitions/GroupingRule"
        },
        {
          "$ref": "#/definitions/InstanceLabelOverride"
        },
        {
          "$ref": "#/definitions/PropertySortingRule"
        },
        {
          "$ref": "#/definitions/DisabledSortingRule"
        },
        {
          "$ref": "#/definitions/ChildNodeRule"
        },
        {
          "$ref": "#/definitions/RootNodeRule"
        },
        {
          "$ref": "#/definitions/ContentModifier"
        }
      ],
      "description": "A union of all presentation rule types."
    },
    "SameLabelInstanceGroup": {
      "additionalProperties": false,
      "description": "Allows grouping multiple instances with the same label into one ECInstances type of node. Similar to display label grouping,\nbut instead of showing a grouping node with multiple grouped ECInstance nodes, it shows a single ECInstances node which represents\nmultiple ECInstances.",
      "properties": {
        "applicationStage": {
          "description": "Grouping nodes by label is an expensive operation because it requires the whole hierarchy level to be created before even the first\ngrouped node can be produced. To alleviate the performance impact when this specification is used, two `applicationStage` settings have been introduced:\n\n- `\"Query\"` groups instances during ECSql query, which can often make use of database indices and is generally fairly quick. It is chosen\n  as the default option, however, it fails to produce grouping nodes when certain ruleset specifications are involved.\n\n- `\"PostProcess\"` groups instances after the whole hierarchy level is built. It incurs a large performance penalty, but it will\n  produce the expected result in all cases.",
          "enum": [
            "PostProcess",
            "Query"
          ],
          "type": "string"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "SameLabelInstance"
          ],
          "type": "string"
        }
      },
      "required": [
        "specType"
      ],
      "type": "object"
    },
    "SchemaCategoryIdentifier": {
      "additionalProperties": false,
      "description": "Identifier of a schema-based  category, referenced by its full name.",
      "properties": {
        "categoryName": {
          "description": "Full name of the property category, e.g. `MySchema:MyPropertyCategory`.",
          "type": "string"
        },
        "type": {
          "description": "Type of the identifier",
          "enum": [
            "SchemaCategory"
          ],
          "type": "string"
        }
      },
      "required": [
        "categoryName",
        "type"
      ],
      "type": "object"
    },
    "SelectedNodeInstancesSpecification": {
      "additionalProperties": false,
      "description": "Returns content for selected (input) instances.",
      "properties": {
        "acceptableClassNames": {
          "description": "Specifies a list of class names which the input instances have to match for the specification to be used.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "acceptablePolymorphically": {
          "description": "Specifies whether derived classes of `acceptableClassNames` should be included in the content.",
          "type": "boolean"
        },
        "acceptableSchemaName": {
          "description": "Specifies ECSchema name which the input instances have to match for the specification to be used.",
          "pattern": "^[\\w\\d]+$",
          "type": "string"
        },
        "calculatedProperties": {
          "description": "Specifications of calculated properties whose values are\ngenerated using provided ECExpressions.",
          "items": {
            "$ref": "#/definitions/CalculatedPropertiesSpecification"
          },
          "type": "array"
        },
        "onlyIfNotHandled": {
          "description": "Specifies whether this specification should be ignored if another specification was handled before as\ndetermined by rule and specification priorities. This provides a mechanism for defining a fallback specification.",
          "type": "boolean"
        },
        "priority": {
          "description": "Controls the order in which specifications are handled — specification with higher priority value is handled\nfirst. If priorities are equal, the specifications are handled in the order they appear in the ruleset.",
          "type": "integer"
        },
        "propertyCategories": {
          "description": "Specifications for custom categories. Simply defining the categories does\nnothing - they have to be referenced from property specification defined in\n`propertyOverrides` by `id`.",
          "items": {
            "$ref": "#/definitions/PropertyCategorySpecification"
          },
          "type": "array"
        },
        "propertyOverrides": {
          "description": "Specifications for various property overrides that allow customizing property display.",
          "items": {
            "$ref": "#/definitions/PropertySpecification"
          },
          "type": "array"
        },
        "relatedInstances": {
          "description": "Specifications of related instances that can be used when creating the content.",
          "items": {
            "$ref": "#/definitions/RelatedInstanceSpecification"
          },
          "type": "array"
        },
        "relatedProperties": {
          "description": "Specifications of related properties which are\nincluded in the generated content.",
          "items": {
            "$ref": "#/definitions/RelatedPropertiesSpecification"
          },
          "type": "array"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "SelectedNodeInstances"
          ],
          "type": "string"
        }
      },
      "required": [
        "specType"
      ],
      "type": "object"
    },
    "SingleSchemaClassSpecification": {
      "additionalProperties": false,
      "description": "This specification is used to point to specific ECClass.",
      "properties": {
        "className": {
          "description": "Specifies name of the target class.",
          "pattern": "^[\\w\\d]+$",
          "type": "string"
        },
        "schemaName": {
          "description": "Specifies name of the schema which contains the target class.",
          "pattern": "^[\\w\\d]+$",
          "type": "string"
        }
      },
      "required": [
        "className",
        "schemaName"
      ],
      "type": "object"
    },
    "StringQuerySpecification": {
      "additionalProperties": false,
      "description": "The specification contains an ECSQL query which is used to query for instances.",
      "properties": {
        "class": {
          "$ref": "#/definitions/SingleSchemaClassSpecification",
          "description": "Specification of ECClass whose instances the query returns. The specification may also point to a\nbase class of instances returned by the query. If the query returns instances that are not of this\nclass, they aren't included in the result set."
        },
        "query": {
          "description": "Specifies the search ECSQL query.",
          "type": "string"
        },
        "specType": {
          "description": "Used for serializing to JSON.",
          "enum": [
            "String"
          ],
          "type": "string"
        }
      },
      "required": [
        "class",
        "query",
        "specType"
      ],
      "type": "object"
    },
    "SubCondition": {
      "additionalProperties": false,
      "description": "This is a sub-rule which shares *placement attributes* and\nnested customization rules\nof the hierarchy rule. This means the attributes of hierarchy rule are still in effect and the sub-rules\ncan add additional condition of their own.",
      "properties": {
        "condition": {
          "description": "Defines a condition which needs to be met in order for the rule to be used. The condition is an\nECExpression which has to evaluate\nto a boolean value.",
          "type": "string"
        },
        "requiredSchemas": {
          "description": "Specifications that define ECSchema requirements for\nthe rule to take effect.",
          "items": {
            "$ref": "#/definitions/RequiredSchemaSpecification"
          },
          "type": "array"
        },
        "specifications": {
          "description": "A list of hierarchy specifications that define what nodes are going to be returned.",
          "items": {
            "$ref": "#/definitions/ChildNodeSpecification"
          },
          "type": "array"
        },
        "subConditions": {
          "description": "A list of nested sub-rules which share *placement attributes* of this sub-condition. This means the\nattributes of this sub-condition are still in effect and the sub-rules can add additional condition\nof their own.",
          "items": {
            "$ref": "#/definitions/SubCondition"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "SupplementationInfo": {
      "additionalProperties": false,
      "description": "Contains supplementation-related information for\nsupplemental rulesets.",
      "properties": {
        "supplementationPurpose": {
          "description": "Identifies why supplementation is done and uniquely identifies particular supplemental ruleset.\nThere can be only one supplemental rule set with the same `Ruleset.id` and `supplementationPurpose`.",
          "type": "string"
        }
      },
      "required": [
        "supplementationPurpose"
      ],
      "type": "object"
    },
    "Variable": {
      "additionalProperties": false,
      "description": "Definition for single user-controllable variable",
      "properties": {
        "defaultValue": {
          "description": "Default value.",
          "type": "string"
        },
        "id": {
          "description": "Id of the variable",
          "type": "string"
        },
        "label": {
          "description": "Label of the variable that is shown in the UI.\nMay be localized.",
          "type": "string"
        },
        "type": {
          "description": "Defines value type. Defaults to `VariableValueType.YesNo`.",
          "enum": [
            "IntValue",
            "ShowHide",
            "StringValue",
            "YesNo"
          ],
          "type": "string"
        }
      },
      "required": [
        "id",
        "label"
      ],
      "type": "object"
    },
    "VariablesGroup": {
      "additionalProperties": false,
      "description": "Presentation rules support variables that allow having additional customization of the hierarchy\nand content based on variables whose values can change during application session.\n\nThere are special ECExpression symbols\nthat can be used to access variables by their ID, so rule conditions can check for a value and change\nthe behavior. It allows showing / hiding some nodes in the hierarchy, change the grouping, etc.",
      "properties": {
        "label": {
          "description": "Group label to display in the UI.\nMay be localized.",
          "type": "string"
        },
        "nestedGroups": {
          "description": "Nested variable groups.",
          "items": {
            "$ref": "#/definitions/VariablesGroup"
          },
          "type": "array"
        },
        "vars": {
          "description": "Grouped variables",
          "items": {
            "$ref": "#/definitions/Variable"
          },
          "type": "array"
        }
      },
      "required": [
        "label",
        "vars"
      ],
      "type": "object"
    }
  },
  "description": "Presentation ruleset is a list of rules that define tree hierarchy and content provided by\nthe presentation library. The ruleset consists of:\n- Ruleset options\n- Hierarchy rules:\n  - Root node rules\n  - Child node rules\n- Content rules for content you see in content controls like property grid and table.\n- Customization rules used for additional customizations such as styling, labeling, checkboxes, etc.\n- User-controllable variables.",
  "properties": {
    "id": {
      "description": "Ruleset identifier. This ID is used to bind UI components with the specific rule set.",
      "minLength": 1,
      "type": "string"
    },
    "requiredSchemas": {
      "description": "Schema requirements for this ruleset. The ruleset is not used if the requirements are not met.",
      "items": {
        "$ref": "#/definitions/RequiredSchemaSpecification"
      },
      "type": "array"
    },
    "rules": {
      "description": "Presentation rules used to create hierarchies and content",
      "items": {
        "$ref": "#/definitions/Rule"
      },
      "type": "array"
    },
    "supplementationInfo": {
      "$ref": "#/definitions/SupplementationInfo",
      "description": "Supplementation-related information for this ruleset"
    },
    "vars": {
      "description": "User-controllable variable definitions",
      "items": {
        "$ref": "#/definitions/VariablesGroup"
      },
      "type": "array"
    },
    "version": {
      "description": "Version of the presentation ruleset in SemVer format: `{major}.{minor}.{patch}`.\n\nSetting the version is optional, but might be useful when ruleset is persisted\nsomewhere and evolves over time. Having a version helps choose persisting\nstrategy (keep all versions or only latest) and find the latest ruleset from a list\nof rulesets with the same id.\n\nDefaults to `0.0.0`.",
      "pattern": "^[\\d]+\\.[\\d]+\\.[\\d]+$",
      "type": "string"
    }
  },
  "required": [
    "id",
    "rules"
  ],
  "type": "object"
}