{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pipelinexlab.com/contracts/component-package-declaration.v2.schema.json",
  "title": "PipelineXLab packaged Component declaration V2",
  "$comment": "Future Component container contract V2 declaration. It is not accepted by the current V1 installer.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "schemaVersion",
    "componentKey",
    "componentContractVersion",
    "label",
    "description",
    "classification",
    "category",
    "typeDefinitions",
    "inputs",
    "results",
    "executorEntry",
    "presentation"
  ],
  "properties": {
    "$schema": {
      "const": "https://pipelinexlab.com/contracts/component-package-declaration.v2.schema.json"
    },
    "schemaVersion": {
      "const": 2
    },
    "componentKey": {
      "$ref": "./pxflow-direct.v1.schema.json#/$defs/semanticKey"
    },
    "componentContractVersion": {
      "$ref": "./component-descriptor.v2.schema.json#/properties/componentContractVersion"
    },
    "label": {
      "$ref": "./component-descriptor.v2.schema.json#/$defs/label"
    },
    "description": {
      "$ref": "./component-descriptor.v2.schema.json#/$defs/description"
    },
    "classification": {
      "const": "flow-node"
    },
    "category": {
      "$ref": "./component-descriptor.v2.schema.json#/$defs/primaryCategory"
    },
    "subcategory": {
      "$ref": "./pxflow-direct.v1.schema.json#/$defs/semanticKey"
    },
    "typeDefinitions": {
      "$ref": "./pxflow-direct.v1.schema.json#/$defs/typeDefinitions"
    },
    "inputs": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "$ref": "./component-descriptor.v2.schema.json#/$defs/inputPort"
      }
    },
    "results": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "$ref": "./component-descriptor.v2.schema.json#/$defs/resultPort"
      }
    },
    "settings": {
      "$comment": "The instance settings this Component declares, absent when it declares none. Eight is the same bound the renderer draws ports with, for the same reason: a panel that needs a scrollbar to show what a Node is configured with is a Node whose configuration belongs in a record the Flow supplies.",
      "type": "array",
      "maxItems": 8,
      "items": {
        "$ref": "./component-descriptor.v2.schema.json#/$defs/settingDeclaration"
      }
    },
    "execution": {
      "$ref": "./component-descriptor.v2.schema.json#/$defs/executionPolicy"
    },
    "executorEntry": {
      "$ref": "./component-descriptor.v2.schema.json#/$defs/executorEntry"
    },
    "presentation": {
      "$ref": "./component-descriptor.v2.schema.json#/$defs/presentation"
    }
  }
}
