{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/repowise-dev/json-schema/repowise-dev-architecture-view-response-schema.json",
  "title": "ArchitectureViewResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/repowise-dev-c4-api-openapi.yml#/components/schemas/ArchitectureViewResponse",
  "properties": {
    "project_name": {
      "type": "string",
      "title": "Project Name"
    },
    "project_description": {
      "type": "string",
      "title": "Project Description"
    },
    "layers": {
      "items": {
        "$ref": "#/$defs/ArchLayerResponse"
      },
      "type": "array",
      "title": "Layers"
    },
    "nodes": {
      "items": {
        "$ref": "#/$defs/ArchNodeResponse"
      },
      "type": "array",
      "title": "Nodes"
    },
    "edges": {
      "items": {
        "$ref": "#/$defs/ArchEdgeResponse"
      },
      "type": "array",
      "title": "Edges"
    },
    "tour": {
      "items": {
        "$ref": "#/$defs/ArchTourStepResponse"
      },
      "type": "array",
      "title": "Tour"
    },
    "total_files": {
      "type": "integer",
      "title": "Total Files"
    },
    "total_symbols": {
      "type": "integer",
      "title": "Total Symbols"
    },
    "total_edges": {
      "type": "integer",
      "title": "Total Edges"
    },
    "languages": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Languages"
    },
    "frameworks": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Frameworks"
    },
    "external_systems": {
      "items": {
        "$ref": "#/$defs/C4ExternalSystemResponse"
      },
      "type": "array",
      "title": "External Systems"
    },
    "entry_points": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Entry Points",
      "default": []
    },
    "entry_candidates": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Entry Candidates",
      "default": []
    }
  },
  "type": "object",
  "required": [
    "project_name",
    "project_description",
    "layers",
    "nodes",
    "edges",
    "tour",
    "total_files",
    "total_symbols",
    "total_edges",
    "languages",
    "frameworks",
    "external_systems"
  ],
  "$defs": {
    "ArchEdgeResponse": {
      "properties": {
        "source": {
          "type": "string",
          "title": "Source"
        },
        "target": {
          "type": "string",
          "title": "Target"
        },
        "edge_type": {
          "type": "string",
          "title": "Edge Type"
        },
        "direction": {
          "type": "string",
          "title": "Direction"
        },
        "weight": {
          "type": "number",
          "title": "Weight"
        },
        "confidence": {
          "type": "number",
          "title": "Confidence"
        }
      },
      "type": "object",
      "required": [
        "source",
        "target",
        "edge_type",
        "direction",
        "weight",
        "confidence"
      ],
      "title": "ArchEdgeResponse"
    },
    "ArchLayerResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "node_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Node Ids"
        },
        "file_count": {
          "type": "integer",
          "title": "File Count"
        },
        "complexity_distribution": {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object",
          "title": "Complexity Distribution"
        },
        "health_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Health Score"
        },
        "sub_groups": {
          "items": {
            "$ref": "#/$defs/ArchSubGroupResponse"
          },
          "type": "array",
          "title": "Sub Groups",
          "default": []
        },
        "display_order": {
          "type": "integer",
          "title": "Display Order",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "description",
        "node_ids",
        "file_count",
        "complexity_distribution",
        "health_score"
      ],
      "title": "ArchLayerResponse"
    },
    "ArchNodeResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "node_type": {
          "type": "string",
          "title": "Node Type"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "file_path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "File Path"
        },
        "line_range": {
          "anyOf": [
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Line Range"
        },
        "summary": {
          "type": "string",
          "title": "Summary"
        },
        "complexity": {
          "type": "string",
          "title": "Complexity"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Tags"
        },
        "language": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Language"
        },
        "pagerank": {
          "type": "number",
          "title": "Pagerank"
        },
        "pagerank_percentile": {
          "type": "number",
          "title": "Pagerank Percentile"
        },
        "betweenness": {
          "type": "number",
          "title": "Betweenness"
        },
        "in_degree": {
          "type": "integer",
          "title": "In Degree"
        },
        "out_degree": {
          "type": "integer",
          "title": "Out Degree"
        },
        "community_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Community Id"
        },
        "is_entry_point": {
          "type": "boolean",
          "title": "Is Entry Point"
        },
        "is_test": {
          "type": "boolean",
          "title": "Is Test"
        },
        "is_hotspot": {
          "type": "boolean",
          "title": "Is Hotspot"
        },
        "is_dead": {
          "type": "boolean",
          "title": "Is Dead"
        },
        "has_doc": {
          "type": "boolean",
          "title": "Has Doc"
        },
        "primary_owner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Primary Owner"
        },
        "primary_owner_pct": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Primary Owner Pct"
        },
        "bus_factor": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bus Factor"
        }
      },
      "type": "object",
      "required": [
        "id",
        "node_type",
        "name",
        "file_path",
        "line_range",
        "summary",
        "complexity",
        "tags",
        "language",
        "pagerank",
        "pagerank_percentile",
        "betweenness",
        "in_degree",
        "out_degree",
        "community_id",
        "is_entry_point",
        "is_test",
        "is_hotspot",
        "is_dead",
        "has_doc",
        "primary_owner",
        "primary_owner_pct",
        "bus_factor"
      ],
      "title": "ArchNodeResponse"
    },
    "ArchSubGroupResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "node_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Node Ids"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "node_ids"
      ],
      "title": "ArchSubGroupResponse"
    },
    "ArchTourStepResponse": {
      "properties": {
        "order": {
          "type": "integer",
          "title": "Order"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "node_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Node Ids"
        },
        "target_path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Target Path"
        },
        "layer_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Layer Id"
        },
        "reason": {
          "type": "string",
          "title": "Reason",
          "default": ""
        },
        "depth": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Depth"
        },
        "kind": {
          "type": "string",
          "title": "Kind",
          "default": ""
        },
        "page_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Page Type"
        }
      },
      "type": "object",
      "required": [
        "order",
        "title",
        "description",
        "node_ids"
      ],
      "title": "ArchTourStepResponse"
    },
    "C4ExternalSystemResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        },
        "category": {
          "type": "string",
          "title": "Category"
        },
        "ecosystem": {
          "type": "string",
          "title": "Ecosystem"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version"
        },
        "io_kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Io Kind"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "display_name",
        "category",
        "ecosystem"
      ],
      "title": "C4ExternalSystemResponse"
    }
  }
}