{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/philidor-io/json-schema/philidor-io-rwa-coverage-response-schema.json",
  "title": "RwaCoverageResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/philidor-io-openapi.json#/components/schemas/RwaCoverageResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "generated_at": {
          "type": "string"
        },
        "universe": {
          "type": "object",
          "properties": {
            "deployments": {
              "type": "number"
            },
            "legacy_symbol_groups": {
              "type": "number"
            },
            "reviewed_deployments": {
              "type": "number"
            },
            "provisional_deployments": {
              "type": "number"
            },
            "unreviewed_deployments": {
              "type": "number"
            },
            "chains": {
              "type": "number"
            },
            "categories": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string"
                  },
                  "deployments": {
                    "type": "number"
                  }
                },
                "required": [
                  "category",
                  "deployments"
                ]
              }
            }
          },
          "required": [
            "deployments",
            "legacy_symbol_groups",
            "reviewed_deployments",
            "provisional_deployments",
            "unreviewed_deployments",
            "chains",
            "categories"
          ]
        },
        "canonical_registry": {
          "type": "object",
          "properties": {
            "reviewed_products": {
              "type": "number"
            },
            "candidate_products": {
              "type": "number"
            },
            "mapped_deployments": {
              "type": "number"
            },
            "candidate_mappings": {
              "type": "number"
            },
            "unmapped_deployments": {
              "type": "number"
            },
            "deployment_mapping_ratio": {
              "type": "number"
            },
            "reviewed_source_policies": {
              "type": "number"
            },
            "products_with_source_policies": {
              "type": "number"
            },
            "source_policy_coverage_ratio": {
              "type": "number"
            }
          },
          "required": [
            "reviewed_products",
            "candidate_products",
            "mapped_deployments",
            "candidate_mappings",
            "unmapped_deployments",
            "deployment_mapping_ratio",
            "reviewed_source_policies",
            "products_with_source_policies",
            "source_policy_coverage_ratio"
          ]
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "field": {
                "type": "string"
              },
              "covered_deployments": {
                "type": "number"
              },
              "total_deployments": {
                "type": "number"
              },
              "coverage_ratio": {
                "type": "number"
              }
            },
            "required": [
              "field",
              "covered_deployments",
              "total_deployments",
              "coverage_ratio"
            ]
          }
        },
        "source_concentration": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "latest_field_observations": {
                "type": "number"
              },
              "share": {
                "type": "number"
              }
            },
            "required": [
              "source",
              "latest_field_observations",
              "share"
            ]
          }
        },
        "canonical_observations": {
          "type": "object",
          "properties": {
            "products": {
              "type": "number"
            },
            "latest_observation_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "fields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "covered_products": {
                    "type": "number"
                  },
                  "total_products": {
                    "type": "number"
                  },
                  "coverage_ratio": {
                    "type": "number"
                  }
                },
                "required": [
                  "field",
                  "covered_products",
                  "total_products",
                  "coverage_ratio"
                ]
              }
            },
            "source_concentration": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "source_id": {
                    "type": "string"
                  },
                  "publisher": {
                    "type": "string"
                  },
                  "latest_field_observations": {
                    "type": "number"
                  },
                  "share": {
                    "type": "number"
                  }
                },
                "required": [
                  "source_id",
                  "publisher",
                  "latest_field_observations",
                  "share"
                ]
              }
            }
          },
          "required": [
            "products",
            "latest_observation_at",
            "fields",
            "source_concentration"
          ]
        },
        "data_sources": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "source_class": {
                "type": "string"
              },
              "transport": {
                "type": "string"
              },
              "publisher": {
                "type": "string"
              },
              "base_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "documentation_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "enabled": {
                "type": "boolean"
              },
              "adapter_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_freshness_hours": {
                "type": "number"
              },
              "latest_publication_status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latest_publication_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "publication_count": {
                "type": "number"
              },
              "operational_status": {
                "type": "string",
                "enum": [
                  "active",
                  "stale",
                  "failing",
                  "unseen",
                  "registered",
                  "disabled"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "source_class",
              "transport",
              "publisher",
              "base_url",
              "documentation_url",
              "enabled",
              "adapter_id",
              "default_freshness_hours",
              "latest_publication_status",
              "latest_publication_at",
              "publication_count",
              "operational_status"
            ]
          }
        },
        "discovery": {
          "type": "object",
          "properties": {
            "enabled_sources": {
              "type": "number"
            },
            "healthy_sources": {
              "type": "number"
            },
            "candidates": {
              "type": "object",
              "additionalProperties": {
                "type": "number"
              }
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last_polled_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "error_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "ingestion_error",
                      null
                    ]
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "status",
                  "last_polled_at",
                  "error_code"
                ]
              }
            }
          },
          "required": [
            "enabled_sources",
            "healthy_sources",
            "candidates",
            "sources"
          ]
        },
        "external_catalog": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "source_id": {
              "type": "string"
            },
            "observed_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "ingested_at": {
              "type": "string"
            },
            "records": {
              "type": "number"
            },
            "explicitly_matched_records": {
              "type": "number"
            },
            "match_ratio": {
              "type": "number"
            },
            "category_counts": {
              "type": "object",
              "additionalProperties": {
                "type": "number"
              }
            }
          },
          "required": [
            "source_id",
            "observed_at",
            "ingested_at",
            "records",
            "explicitly_matched_records",
            "match_ratio",
            "category_counts"
          ]
        },
        "quality_flags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "quality_sla": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "healthy",
                "degraded",
                "critical"
              ]
            },
            "targets": {
              "type": "object",
              "properties": {
                "canonicalIdentity": {
                  "type": "number"
                },
                "sourcePolicyCoverage": {
                  "type": "number"
                },
                "externalCatalogMatch": {
                  "type": "number"
                },
                "fundAum": {
                  "type": "number"
                },
                "duration": {
                  "type": "number"
                },
                "maxSingleSourceShare": {
                  "type": "number"
                },
                "discoveryHealth": {
                  "type": "number"
                },
                "catalogFreshnessHours": {
                  "type": "number"
                }
              },
              "required": [
                "canonicalIdentity",
                "sourcePolicyCoverage",
                "externalCatalogMatch",
                "fundAum",
                "duration",
                "maxSingleSourceShare",
                "discoveryHealth",
                "catalogFreshnessHours"
              ]
            },
            "findings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "P0",
                      "P1",
                      "P2"
                    ]
                  },
                  "actual": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "target": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "severity",
                  "actual",
                  "target",
                  "message"
                ]
              }
            }
          },
          "required": [
            "status",
            "targets",
            "findings"
          ]
        }
      },
      "required": [
        "generated_at",
        "universe",
        "canonical_registry",
        "fields",
        "source_concentration",
        "canonical_observations",
        "data_sources",
        "discovery",
        "external_catalog",
        "quality_flags",
        "quality_sla"
      ]
    }
  },
  "required": [
    "data"
  ]
}