{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/decide-fyi/json-schema/decide-fyi-decision-benchmark-schema.json",
  "title": "DecisionBenchmark",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/decide-fyi-openapi.json#/components/schemas/DecisionBenchmark",
  "type": "object",
  "required": [
    "ok",
    "decision_benchmark_version",
    "policy_id",
    "privacy",
    "your_metrics",
    "cross_customer",
    "recommendation",
    "benchmark_hash"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "decision_benchmark_version": {
      "type": "string",
      "const": "decision_benchmark_v1"
    },
    "generated_at": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "const": "decision_outcomes"
    },
    "scope": {
      "type": "string",
      "const": "caller_api_key_plus_anonymized_opt_in_cohort"
    },
    "policy_id": {
      "type": "string"
    },
    "policy_version": {
      "type": [
        "string",
        "null"
      ]
    },
    "privacy": {
      "type": "object",
      "properties": {
        "anonymized": {
          "type": "boolean"
        },
        "raw_records_exposed": {
          "type": "boolean",
          "const": false
        },
        "caller_excluded_from_cohort": {
          "type": "boolean"
        },
        "opt_in_required": {
          "type": "boolean"
        },
        "enabled": {
          "type": "boolean"
        },
        "minimum_cohort_scopes": {
          "type": "integer"
        },
        "minimum_cohort_decisions": {
          "type": "integer"
        }
      },
      "additionalProperties": true
    },
    "your_metrics": {
      "type": "object",
      "additionalProperties": true
    },
    "cross_customer": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "available",
            "insufficient_cohort",
            "no_cohort_data",
            "disabled"
          ]
        },
        "cohort_scopes": {
          "type": "integer"
        },
        "cohort_decisions": {
          "type": "integer"
        },
        "threshold_met": {
          "type": "boolean"
        },
        "metrics": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        },
        "percentiles": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "comparison": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "recommendation": {
      "type": "string",
      "enum": [
        "benchmark_unavailable",
        "within_cohort_range",
        "review_policy_outcomes",
        "tighten_approval_policy",
        "reduce_manual_review_pressure"
      ]
    },
    "benchmark_hash": {
      "type": "string"
    }
  },
  "additionalProperties": true
}