{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/philidor-io/json-schema/philidor-io-curator-detail-response-schema.json",
  "title": "CuratorDetailResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/philidor-io-curators-api-openapi.yml#/components/schemas/CuratorDetailResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "curator": {
          "$ref": "#/$defs/Curator"
        },
        "vaults": {
          "type": "array",
          "items": {}
        },
        "chainDistribution": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number"
              },
              "name": {
                "type": "string"
              },
              "vault_count": {
                "type": "number"
              },
              "tvl": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "name",
              "vault_count",
              "tvl"
            ]
          }
        },
        "events": {
          "type": "array",
          "items": {}
        },
        "eventsTotal": {
          "type": "number"
        },
        "trackRecord": {
          "$ref": "#/$defs/CuratorTrackRecord"
        }
      },
      "required": [
        "curator",
        "vaults",
        "chainDistribution",
        "events",
        "eventsTotal",
        "trackRecord"
      ]
    }
  },
  "required": [
    "data"
  ],
  "$defs": {
    "Curator": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "logo_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "website": {
          "type": [
            "string",
            "null"
          ]
        },
        "one_liner": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string"
        },
        "tvl_total": {
          "type": "number"
        },
        "vault_count": {
          "type": "number"
        },
        "avg_apr": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "logo_url",
        "website",
        "one_liner",
        "created_at",
        "tvl_total",
        "vault_count",
        "avg_apr"
      ]
    },
    "CuratorTrackRecord": {
      "type": "object",
      "properties": {
        "scoredVaultCount": {
          "type": "number",
          "description": "Active, non-shutdown vaults carrying a published score. Denominator for the dispersion below."
        },
        "scoreDispersion": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "worst": {
              "type": "number"
            },
            "p25": {
              "type": "number"
            },
            "median": {
              "type": "number"
            },
            "p75": {
              "type": "number"
            },
            "best": {
              "type": "number"
            },
            "spread": {
              "type": "number",
              "description": "best minus worst — how far apart the safest and riskiest vault in the book sit."
            }
          },
          "required": [
            "worst",
            "p25",
            "median",
            "p75",
            "best",
            "spread"
          ],
          "description": "Shape of the curator book, not an average. A mean hides the case this exists to show: a curator running one very safe vault and one poor one. Null when no vault is scored yet — never reported as zeros."
        },
        "tierDistribution": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tier": {
                "type": "string"
              },
              "vaultCount": {
                "type": "number"
              },
              "tvlUsd": {
                "type": "number"
              }
            },
            "required": [
              "tier",
              "vaultCount",
              "tvlUsd"
            ]
          },
          "description": "Published tier mix, as counts and TVL rather than proportions."
        },
        "incidentHistory": {
          "type": "object",
          "properties": {
            "total": {
              "type": "number"
            },
            "critical": {
              "type": "number"
            },
            "warning": {
              "type": "number"
            },
            "lossUsd": {
              "type": [
                "number",
                "null"
              ],
              "description": "Sum of recorded losses. Null when no incident carries a loss figure — distinct from a genuine zero."
            },
            "mostRecentAt": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "total",
            "critical",
            "warning",
            "lossUsd",
            "mostRecentAt"
          ],
          "description": "Incidents on vaults this curator runs, whether or not the event is explicitly tagged to them. Attribution is mostly derived through the vault, because explicit curator tagging is sparse."
        }
      },
      "required": [
        "scoredVaultCount",
        "scoreDispersion",
        "tierDistribution",
        "incidentHistory"
      ]
    }
  }
}