{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zippedscript/json-schema/zippedscript-read-institution-schema.json",
  "title": "ReadInstitution",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zippedscript-institution-api-openapi.yml#/components/schemas/ReadInstitution",
  "required": [
    "name",
    "country"
  ],
  "type": "object",
  "properties": {
    "id": {
      "title": "Id",
      "description": "ID of the institution to be used in verification requests",
      "type": "integer",
      "readOnly": true
    },
    "name": {
      "title": "Name",
      "description": "The name of the institution",
      "type": "string",
      "maxLength": 255,
      "minLength": 1
    },
    "native_name": {
      "title": "Native name",
      "description": "The native name of the institution",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "country": {
      "title": "Country",
      "description": "ISO Country Code",
      "type": "string",
      "maxLength": 3,
      "minLength": 1
    },
    "city": {
      "title": "City",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "state": {
      "title": "State",
      "description": "This can also be a province, territory, etc.",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "logo": {
      "title": "Logo",
      "description": "URL of the institution's logo",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "year_limits": {
      "title": "Year limits",
      "type": [
        "array",
        "null"
      ],
      "description": "Valid graduation year ranges for this institution. A null start or end leaves that side open.",
      "items": {
        "type": "object",
        "properties": {
          "start": {
            "type": [
              "integer",
              "null"
            ]
          },
          "end": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      }
    },
    "is_working": {
      "title": "Is working",
      "type": "boolean"
    }
  }
}