type: dictionary
additionalProperties:
  # every property here is a Node Type
  type: dictionary
  properties:
    'properties':
      type: dictionary

      # for each property...
      additionalProperties:
        type:
          -
            type: 'null'
          -
            type: dictionary
            properties:
              'ui':
                # here, we specify ONLY the "ui" part of the schema, as the remaining parts
                # are already specified in the NodeTypes schema of the ContentRepository package
                type: dictionary
                additionalProperties: false
                properties:

                  'label': { type: ['null', 'string'], description: "Human-readable label for this property." }

                  'help':
                    type:
                      -
                        type: 'null'
                      -
                        type: dictionary
                        additionalProperties: false
                        properties:
                          'message': { type: string, description: "Help text for this property. Supports markdown." }

                  'reloadIfChanged': { type: ['null', 'boolean'], description: "If this property changes, should a element refresh occur?" }

                  'reloadPageIfChanged': { type: ['null', 'boolean'], description: "If this property changes, should a page reload occur?" }

                  'inlineEditable': { type: ['null', 'boolean'], description: "Is this property inline editable, i.e. edited directly on the page?" }

                  'inline': { type: ['null', 'dictionary'] }

                  'showInCreationDialog': { type: ['null', 'boolean'], description: 'If this property should be promoted into the CreationDialog of the corresponding node. Inspector configuration is applied from "ui.inspector" configuration in that case' }

                  'inspector':
                    type:
                      -
                        type: 'null'
                      -
                        type: dictionary
                        additionalProperties: false
                        properties:

                          'hidden': { type: ['string', 'boolean', 'null'], description: 'Option to hide a property.' }

                          'group': { type: ['string', 'null'], description: 'Identifier of the inspector group in which this property should be edited. If not set, will not appear in inspector at all.' }

                          'position': { type: ['string', 'integer', 'null'], description: 'Position inside the inspector group, small numbers are sorted on top' }

                          'editor': { type: ['string', 'null'], description: 'Name of the JavaScript Editor Class which is instanciated to edit this element in the inspector.' }

                          'editorOptions': { type: ['null', 'dictionary'], description: 'options for the given editor' }

                          'editorListeners':
                            type:
                              -
                                type: 'null'
                              -
                                type: dictionary
                                additionalProperties:
                                  type: dictionary
                                  additionalProperties: false
                                  properties:
                                    'property': { type: ['string'], description: 'The name of an observed property in the same NodeType.' }
                                    'handler': { type: ['string'], description: 'The path to a handler JavaScript object, similar to custom editors and validators.' }
                                    'handlerOptions':  { type: dictionary, description: 'options for the given handler' }

    'fusion':
      # here we specify only the neos specific options of the NodeType schema,
      # other options might be defined by cr or other packages
      type: dictionary
      additionalProperties: true
      properties:
        prototypeGenerator:
          - { type: 'null' }
          - { type: string, format: class-name }

    'ui':
      # here, we specify ONLY the "ui" part of the schema, as the remaining parts
      # are already specified in the NodeTypes schema of the ContentRepository package
      type: dictionary
      additionalProperties: false
      properties:

        'label': { type: string, description: "Human-readable label for this Node Type." }

        'help':
          type: dictionary
          additionalProperties: false
          properties:
            'message': { type: string, description: "Help text for this Node Type. Supports markdown." }

        'icon': { type: string, description: "Icon class" }

        'inlineEditable': { type: boolean, description: "If true, it is possible to interact with this Node directly in the content view. If false, an overlay is shown preventing any interaction with the node." }

        'group': { type: string, description: "Name of the group this content element is grouped into for the 'New Content Element' dialog." }

        'position': { type: ['string', 'integer', 'null'], description: 'Position of the node type in the insert new panels' }

        'inspector':
          type: dictionary
          additionalProperties: false
          properties:

            'tabs':
              type: dictionary
              additionalProperties:

                # for each inspector tab:
                type: dictionary
                additionalProperties: false
                properties:

                  'label': { type: string, description: "Human-readable label for this Inspector Tab." }

                  'icon': { type: string, description: "CSS Class for displaying an icon for each tab." }

                  'position': { type: ['string', 'integer', 'null'], description: 'Position of the inspector tab, small numbers are sorted on left' }

            'groups':
              type: dictionary
              additionalProperties:

                # for each inspector group:
                type: dictionary
                additionalProperties: false
                properties:

                  'label': { type: string, description: "Human-readable label for this Inspector Group." }

                  'tab': { type: string, description: "Reference to a tab identifier." }

                  'position': { type: ['string', 'integer', 'null'], description: 'Position of the inspector group, small numbers are sorted on top' }

                  'collapsed': { type: boolean, description: 'If true, the group in the inspector panel is collapsed by default.' }

                  'icon': { type: string, description: "CSS Class for displaying an icon for each group." }

            'views':
              type: dictionary
              additionalProperties:

                # for each inspector view:
                type: dictionary
                additionalProperties: false
                properties:

                  'label': { type: string, description: "Human-readable label for this view." }

                  'group': { type: string, description: "Name of the group this view is grouped into" }

                  'view': { type: string, description: "The view implementation" }

                  'viewOptions': { type: dictionary, description: "Options for the view" }

                  'position': { type: ['string', 'integer', 'null'], description: 'Position of the view, small numbers are sorted on top' }

        'creationDialog':
          type: dictionary
          additionalProperties: false
          properties:
            'elements':
              -
                type: 'null'
              -
                type: dictionary
                additionalProperties:
                  type: dictionary
                  additionalProperties: false
                  properties:
                    'type': { type: string, description: "Type of the element" }
                    'ui':
                      type: dictionary
                      additionalProperties: false
                      properties:

                        'label': { type: string, description: "Human-readable label for this element." }

                        'editor': { type: string, description: "Name of the Editor Component which is instanciated to edit this element." }

                        'editorOptions': { type: dictionary, description: "Options for the given editor" }

                    'validation':
                      type: ['dictionary', 'null']

        'search':
          type: dictionary
          additionalProperties: false
          properties:

            'searchCategory': { type: string, description: "If searching for this node type in the search, the results will be grouped by this category." }
