{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/university-of-warsaw/main/json-schema/university-of-warsaw-installation-schema.json",
  "title": "USOS Installation",
  "description": "JSON Schema for a University of Warsaw USOS API installation object (services/apisrv/installation). Derived from the live USOS API reference and confirmed against a live response.",
  "type": "object",
  "properties": {
    "base_url": { "type": "string", "description": "Base URL of this installation." },
    "version": { "type": "string", "description": "Human-readable version string." },
    "machine_version": {
      "type": "string",
      "description": "Machine-readable version in 0.0.0.0-0 format.",
      "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+$"
    },
    "usos_schema_version": { "type": "string", "description": "Version of the USOS database." },
    "institution_name": {
      "description": "Name of the owning institution, or null if unknown.",
      "anyOf": [
        { "$ref": "#/$defs/LangDict" },
        { "type": "null" }
      ]
    },
    "contact_emails": {
      "type": "array",
      "description": "Email addresses of local USOS API administrators.",
      "items": { "type": "string", "format": "email" }
    },
    "schac_id": { "type": "string", "description": "Unique institution ID in SCHAC format." },
    "mcards_support": { "type": "boolean" },
    "mobile_usos_support": { "type": "boolean" }
  },
  "$defs": {
    "LangDict": {
      "type": "object",
      "properties": {
        "pl": { "type": "string" },
        "en": { "type": "string" }
      }
    }
  }
}
