{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-feature-distribution-response-schema.json",
  "title": "FeatureDistributionResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-m42-api-openapi.yml#/components/schemas/FeatureDistributionResponse",
  "properties": {
    "workspace_id": {
      "type": "string",
      "format": "uuid",
      "title": "Workspace Id"
    },
    "feature": {
      "type": "string",
      "title": "Feature"
    },
    "kind": {
      "type": "string",
      "title": "Kind"
    },
    "bins": {
      "items": {
        "$ref": "#/$defs/HistogramBin"
      },
      "type": "array",
      "title": "Bins"
    },
    "n_total": {
      "type": "integer",
      "title": "N Total"
    },
    "n_y1": {
      "type": "integer",
      "title": "N Y1"
    }
  },
  "type": "object",
  "required": [
    "workspace_id",
    "feature",
    "kind",
    "bins",
    "n_total",
    "n_y1"
  ],
  "$defs": {
    "HistogramBin": {
      "properties": {
        "x_lo": {
          "type": "number",
          "title": "X Lo"
        },
        "x_hi": {
          "type": "number",
          "title": "X Hi"
        },
        "y0": {
          "type": "integer",
          "title": "Y0"
        },
        "y1": {
          "type": "integer",
          "title": "Y1"
        }
      },
      "type": "object",
      "required": [
        "x_lo",
        "x_hi",
        "y0",
        "y1"
      ],
      "title": "HistogramBin"
    }
  }
}