{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/centaur-labs/json-schema/centaur-labs-set-gold-standard-request-schema.json",
  "title": "SetGoldStandardRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/centaur-labs-add-and-manage-labels-api-openapi.yml#/components/schemas/SetGoldStandardRequest",
  "properties": {
    "gold_standards": {
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/GoldStandardRange"
          },
          {
            "$ref": "#/$defs/GoldStandardUUID"
          },
          {
            "$ref": "#/$defs/GoldStandardSegmentation"
          },
          {
            "$ref": "#/$defs/GoldStandardClassification"
          }
        ]
      },
      "type": "array",
      "minItems": 1,
      "title": "Gold Standards"
    }
  },
  "type": "object",
  "required": [
    "gold_standards"
  ],
  "$defs": {
    "GoldStandardClassification": {
      "properties": {
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 250,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Notes"
        },
        "case_id": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "null"
            }
          ],
          "title": "Case Id"
        },
        "content_id": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Id"
        },
        "origin": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 250,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Origin"
        },
        "answer": {
          "items": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1
          },
          "type": "array",
          "title": "Answer",
          "unique_items": true
        }
      },
      "type": "object",
      "required": [
        "answer"
      ],
      "title": "GoldStandardClassification"
    },
    "GoldStandardRange": {
      "properties": {
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 250,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Notes"
        },
        "case_id": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "null"
            }
          ],
          "title": "Case Id"
        },
        "content_id": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Id"
        },
        "origin": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 250,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Origin"
        },
        "answer": {
          "items": {
            "$ref": "#/$defs/RangeAnswer"
          },
          "type": "array",
          "title": "Answer",
          "unique_items": true
        }
      },
      "type": "object",
      "required": [
        "answer"
      ],
      "title": "GoldStandardRange"
    },
    "GoldStandardSegmentation": {
      "properties": {
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 250,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Notes"
        },
        "case_id": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "null"
            }
          ],
          "title": "Case Id"
        },
        "content_id": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Id"
        },
        "origin": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 250,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Origin"
        },
        "answer": {
          "items": {
            "$ref": "#/$defs/SegmentationAnswer"
          },
          "type": "array",
          "title": "Answer",
          "unique_items": true
        }
      },
      "type": "object",
      "required": [
        "answer"
      ],
      "title": "GoldStandardSegmentation"
    },
    "GoldStandardUUID": {
      "properties": {
        "notes": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 250,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Notes"
        },
        "case_id": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "null"
            }
          ],
          "title": "Case Id"
        },
        "content_id": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Id"
        },
        "origin": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 250,
              "minLength": 1
            },
            {
              "type": "null"
            }
          ],
          "title": "Origin"
        },
        "answer": {
          "items": {
            "$ref": "#/$defs/UUIDAnswer"
          },
          "type": "array",
          "title": "Answer",
          "unique_items": true
        }
      },
      "type": "object",
      "required": [
        "answer"
      ],
      "title": "GoldStandardUUID"
    },
    "RangeAnswer": {
      "properties": {
        "answer_class": {
          "type": "string",
          "title": "Answer Class"
        },
        "ranges": {
          "items": {
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "type": "array",
            "maxItems": 2,
            "minItems": 2
          },
          "type": "array",
          "minItems": 1,
          "title": "Ranges"
        },
        "freetexts": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "unique_items": true
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Freetexts"
        }
      },
      "type": "object",
      "required": [
        "answer_class",
        "ranges"
      ],
      "title": "RangeAnswer"
    },
    "SegmentationAnswer": {
      "properties": {
        "answer_class": {
          "type": "string",
          "title": "Answer Class"
        },
        "geometries": {
          "items": {
            "type": "string",
            "minLength": 1
          },
          "type": "array",
          "minItems": 1,
          "title": "Geometries",
          "unique_items": true
        },
        "freetexts": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "unique_items": true
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Freetexts"
        }
      },
      "type": "object",
      "required": [
        "answer_class",
        "geometries"
      ],
      "title": "SegmentationAnswer"
    },
    "UUIDAnswer": {
      "properties": {
        "answer_class": {
          "type": "string",
          "title": "Answer Class"
        },
        "mask_uuid": {
          "type": "string",
          "format": "uuid",
          "title": "Mask Uuid"
        }
      },
      "type": "object",
      "required": [
        "answer_class",
        "mask_uuid"
      ],
      "title": "UUIDAnswer"
    }
  }
}