{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cubi-estate/json-schema/cubi-estate-gold-patch-schema.json",
  "title": "GoldPatch",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cubi-estate-concept-pairs-api-openapi.yml#/components/schemas/GoldPatch",
  "properties": {
    "gold_class": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "equivalent",
            "a_implies_b",
            "b_implies_a",
            "exclusive",
            "related",
            "unrelated",
            "ambiguous"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Gold Class"
    },
    "gold_reason_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ],
      "title": "Gold Reason Code"
    },
    "gold_notes": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Gold Notes"
    },
    "gold_split": {
      "type": "string",
      "enum": [
        "dev",
        "holdout",
        "challenge"
      ],
      "title": "Gold Split",
      "default": "dev"
    },
    "gold_flags": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/ConceptFlags"
          },
          "propertyNames": {
            "enum": [
              "a",
              "b"
            ]
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Gold Flags"
    }
  },
  "type": "object",
  "$defs": {
    "ConceptFlags": {
      "properties": {
        "bad_aliases": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 40,
          "title": "Bad Aliases"
        },
        "wrong_category": {
          "type": "boolean",
          "title": "Wrong Category",
          "default": false
        },
        "wrong_definition": {
          "type": "boolean",
          "title": "Wrong Definition",
          "default": false
        },
        "note": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 500
            },
            {
              "type": "null"
            }
          ],
          "title": "Note"
        }
      },
      "type": "object",
      "title": "ConceptFlags",
      "description": "Concept-level defects noticed while labelling: not about the pair."
    }
  }
}