{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/karmacheck/json-schema/karmacheck-testimony-education-schema.json",
  "title": "TestimonyEducation",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/karmacheck-candidate-onboarding-api-openapi.yml#/components/schemas/TestimonyEducation",
  "type": "object",
  "required": [
    "id",
    "institution",
    "city",
    "state",
    "country",
    "current",
    "monthEnd",
    "yearEnd"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "The unique identifier of the testimony record.",
      "readOnly": true
    },
    "institution": {
      "type": "string",
      "description": "The name of the institution where the candidate received their education."
    },
    "city": {
      "type": "string",
      "description": "The city in which the institution is located."
    },
    "state": {
      "type": "string",
      "description": "The two-letter state code."
    },
    "country": {
      "type": "string",
      "description": "The ISO 3166 (2 or 3 letter) code."
    },
    "nameIfDifferent": {
      "type": "string",
      "description": "The candidate's name that's on record with the institution."
    },
    "educationType": {
      "description": "The type of education, such as a college or university, a high school or equivalent (for example, GED), a technical or trade school, or other.",
      "type": "string"
    },
    "current": {
      "type": "boolean",
      "default": false,
      "description": "True if the candidate is currently enrolled at the institution; false otherwise. (Required true if `monthEnd` and `yearEnd` are not provided)"
    },
    "degree": {
      "type": "string",
      "description": "The educational degree."
    },
    "major": {
      "type": "string",
      "description": "The candidate's field of study."
    },
    "gpa": {
      "type": "string",
      "description": "The candidate's grade point average (GPA)."
    },
    "monthBegin": {
      "type": "string",
      "description": "The month in which the candidate began their education."
    },
    "yearBegin": {
      "type": "string",
      "description": "The year in which the candidate began their education."
    },
    "monthEnd": {
      "type": "string",
      "description": "The month in which the candidate completed their education. Not applicable if `current` is true. (Required if `current` is false or not provided)"
    },
    "yearEnd": {
      "type": "string",
      "description": "The year in which the candidate completed their education. Not applicable if `current` is true. (Required if `current` is false or not provided)"
    },
    "comments": {
      "type": "string"
    },
    "contact": {
      "$ref": "#/$defs/TestimonyContact",
      "description": "The institution's contact information."
    }
  },
  "$defs": {
    "TestimonyContact": {
      "title": "TestimonyContact",
      "type": "object",
      "properties": {
        "phone": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "website": {
          "type": "string"
        }
      }
    }
  }
}