{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aveco-app/json-schema/aveco-app-aveco-webapp-routes-data-collection-graph-save-body-schema.json",
  "title": "GraphSaveBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aveco-app-data-collection-api-openapi.yml#/components/schemas/aveco__webapp__routes__data_collection__GraphSaveBody",
  "properties": {
    "nodes": {
      "items": {
        "$ref": "#/$defs/aveco__webapp__routes__data_collection__GraphNodeBody"
      },
      "type": "array",
      "title": "Nodes"
    },
    "edges": {
      "items": {
        "$ref": "#/$defs/GraphEdgeBody"
      },
      "type": "array",
      "title": "Edges"
    }
  },
  "type": "object",
  "required": [
    "nodes",
    "edges"
  ],
  "$defs": {
    "GraphEdgeBody": {
      "properties": {
        "from_node_key": {
          "type": "string",
          "title": "From Node Key"
        },
        "to_node_key": {
          "type": "string",
          "title": "To Node Key"
        },
        "branch_key": {
          "type": "string",
          "title": "Branch Key",
          "default": "default"
        }
      },
      "type": "object",
      "required": [
        "from_node_key",
        "to_node_key"
      ],
      "title": "GraphEdgeBody"
    },
    "aveco__webapp__routes__data_collection__GraphNodeBody": {
      "properties": {
        "node_key": {
          "type": "string",
          "title": "Node Key"
        },
        "node_type": {
          "type": "string",
          "title": "Node Type"
        },
        "catalog_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Catalog Key"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label"
        },
        "config": {
          "additionalProperties": true,
          "type": "object",
          "title": "Config",
          "default": {}
        },
        "position": {
          "additionalProperties": true,
          "type": "object",
          "title": "Position",
          "default": {
            "x": 0,
            "y": 0
          }
        }
      },
      "type": "object",
      "required": [
        "node_key",
        "node_type"
      ],
      "title": "GraphNodeBody"
    }
  }
}