{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/repowise-dev/json-schema/repowise-dev-coupling-graph-response-schema.json",
  "title": "CouplingGraphResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/repowise-dev-coupling-api-openapi.yml#/components/schemas/CouplingGraphResponse",
  "properties": {
    "nodes": {
      "items": {
        "$ref": "#/$defs/CouplingNodeResponse"
      },
      "type": "array",
      "title": "Nodes"
    },
    "edges": {
      "items": {
        "$ref": "#/$defs/CouplingEdgeResponse"
      },
      "type": "array",
      "title": "Edges"
    },
    "total_edges": {
      "type": "integer",
      "title": "Total Edges",
      "default": 0
    },
    "coupled_files": {
      "type": "integer",
      "title": "Coupled Files",
      "default": 0
    },
    "total_files": {
      "type": "integer",
      "title": "Total Files",
      "default": 0
    },
    "depth": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Depth"
    }
  },
  "type": "object",
  "$defs": {
    "CouplingEdgeResponse": {
      "properties": {
        "source": {
          "type": "string",
          "title": "Source"
        },
        "target": {
          "type": "string",
          "title": "Target"
        },
        "strength": {
          "type": "number",
          "title": "Strength"
        },
        "last_co_change": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Co Change"
        },
        "support": {
          "type": "integer",
          "title": "Support",
          "default": 0
        },
        "confidence_ab": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Confidence Ab"
        },
        "confidence_ba": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Confidence Ba"
        },
        "structural": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "corroborated",
                "unexplained",
                "not_applicable"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Structural"
        },
        "dependency_kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Dependency Kind"
        },
        "cross_area": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cross Area"
        }
      },
      "type": "object",
      "required": [
        "source",
        "target",
        "strength"
      ],
      "title": "CouplingEdgeResponse"
    },
    "CouplingNodeResponse": {
      "properties": {
        "file_path": {
          "type": "string",
          "title": "File Path"
        },
        "module": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Module"
        },
        "score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Score"
        },
        "nloc": {
          "type": "integer",
          "title": "Nloc",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "file_path"
      ],
      "title": "CouplingNodeResponse"
    }
  }
}