{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/phoenix/json-schema/phoenix-get-annotation-config-response-body-schema.json",
  "title": "GetAnnotationConfigResponseBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/phoenix-annotation-configs-api-openapi.yml#/components/schemas/GetAnnotationConfigResponseBody",
  "properties": {
    "data": {
      "oneOf": [
        {
          "$ref": "#/$defs/CategoricalAnnotationConfig"
        },
        {
          "$ref": "#/$defs/ContinuousAnnotationConfig"
        },
        {
          "$ref": "#/$defs/FreeformAnnotationConfig"
        }
      ],
      "title": "Data"
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "CategoricalAnnotationConfig": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "type": {
          "type": "string",
          "const": "CATEGORICAL",
          "title": "Type"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "title": "Description"
        },
        "optimization_direction": {
          "$ref": "#/$defs/OptimizationDirection"
        },
        "values": {
          "items": {
            "$ref": "#/$defs/CategoricalAnnotationValue"
          },
          "type": "array",
          "title": "Values"
        },
        "id": {
          "type": "string",
          "title": "Id"
        }
      },
      "type": "object",
      "required": [
        "name",
        "type",
        "optimization_direction",
        "values",
        "id"
      ],
      "title": "CategoricalAnnotationConfig"
    },
    "CategoricalAnnotationValue": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "score": {
          "type": [
            "number",
            "null"
          ],
          "title": "Score"
        }
      },
      "type": "object",
      "required": [
        "label"
      ],
      "title": "CategoricalAnnotationValue"
    },
    "ContinuousAnnotationConfig": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "type": {
          "type": "string",
          "const": "CONTINUOUS",
          "title": "Type"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "title": "Description"
        },
        "optimization_direction": {
          "$ref": "#/$defs/OptimizationDirection"
        },
        "lower_bound": {
          "type": [
            "number",
            "null"
          ],
          "title": "Lower Bound"
        },
        "upper_bound": {
          "type": [
            "number",
            "null"
          ],
          "title": "Upper Bound"
        },
        "id": {
          "type": "string",
          "title": "Id"
        }
      },
      "type": "object",
      "required": [
        "name",
        "type",
        "optimization_direction",
        "id"
      ],
      "title": "ContinuousAnnotationConfig"
    },
    "FreeformAnnotationConfig": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "type": {
          "type": "string",
          "const": "FREEFORM",
          "title": "Type"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "title": "Description"
        },
        "optimization_direction": {
          "$ref": "#/$defs/OptimizationDirection"
        },
        "threshold": {
          "type": [
            "number",
            "null"
          ],
          "title": "Threshold"
        },
        "lower_bound": {
          "type": [
            "number",
            "null"
          ],
          "title": "Lower Bound"
        },
        "upper_bound": {
          "type": [
            "number",
            "null"
          ],
          "title": "Upper Bound"
        },
        "id": {
          "type": "string",
          "title": "Id"
        }
      },
      "type": "object",
      "required": [
        "name",
        "type",
        "id"
      ],
      "title": "FreeformAnnotationConfig"
    },
    "OptimizationDirection": {
      "type": "string",
      "enum": [
        "MINIMIZE",
        "MAXIMIZE",
        "NONE"
      ],
      "title": "OptimizationDirection"
    }
  }
}