{
  "$schema": "https://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "Pipeline Flow Palette",
  "description": "Common Canvas palette schema",
  "id": "https://api.dataplatform.ibm.com/schemas/common-canvas/palette/palette-v3-schema.json",
  "properties": {
    "version": {
      "description": "Palette schema version",
      "enum": [
        "3.0"
      ]
    },
    "categories": {
      "description": "Array of palette categories",
      "type": "array",
      "minItems": 0,
      "items": {
        "$ref": "#/definitions/category_def"
      },
      "uniqueItems": true
    }
  },
  "additionalProperties": false,
  "definitions": {
    "category_def": {
      "description": "Palette Category",
      "type": "object",
      "properties": {
        "id": {
          "description": "ID of the category",
          "type": "string"
        },
        "label": {
          "description": "Category label",
          "type": "string"
        },
        "description": {
          "description": "Category description",
          "type": "string"
        },
        "is_open": {
          "description": "Boolean to indicate if the category is open (true) or not (false).",
          "type": "boolean"
        },
        "empty_text": {
          "description": "When set to a non-empty string and node_types is empty, is used to indicate that no nodes exist",
          "type": "string"
        },
        "loading_text": {
          "description": "When set to a non-empty string, causes a loading indicator to appear with this text as a label",
          "type": "string"
        },
        "image": {
          "description": "Encoded image or image reference for the category",
          "type": "string"
        },
        "node_types": {
          "description": "Array of pipeline node types",
          "type": "array",
          "minItems": 0,
          "items": {
            "$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json#/definitions/node_type_def"
          },
          "uniqueItems": true
        }
      },
      "required": [
        "id",
        "label"
      ],
      "additionalProperties": false
    }
  }
}
