{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://jsonschema.net",
  "type": "object",
  "description": "Schema for the FS alumni data.",
  "name": "/",
  "properties": {
    "id": {
      "id": "http://jsonschema.net/id",
      "type": "integer",
      "description": "Id of the person, an internal FS-ID.",
      "name": "id"
    },
    "firstName": {
      "id": "http://jsonschema.net/firstName",
      "type": "string",
      "description": "First name of person.",
      "name": "firstName"
    },
    "lastName": {
      "id": "http://jsonschema.net/lastName",
      "type": "string",
      "description": "Last name of person.",
      "name": "lastName"
    },
    "email": {
      "id": "http://jsonschema.net/email",
      "type": "string",
      "description": "Email address.",
      "name": "email"
    },
    "phoneNumber": {
      "id": "http://jsonschema.net/phoneNumber",
      "type": "string",
      "description": "Phone number with country prefix (+).",
      "name": "phoneNumber"
    },
    "startOfStudy": {
      "id": "http://jsonschema.net/startOfStudy",
      "type": "string",
      "description": "Date when the student started his study in ISO 8601 format.",
      "name": "startOfStudy"
    },
    "address": {
      "id": "http://jsonschema.net/address",
      "type": "object",
      "description": "Persons adress.",
      "name": "address",
      "properties": {
        "city": {
          "id": "http://jsonschema.net/address/city",
          "type": "string",
          "description": "The city the person originates.",
          "name": "city"
        },
        "country": {
          "id": "http://jsonschema.net/address/country",
          "type": "string",
          "description": "Country in ISO 3166-1 alfa-2 format.",
          "name": "country"
        },
        "postCode": {
          "id": "http://jsonschema.net/address/postCode",
          "type": "string",
          "description": "Postcode for adress.",
          "name": "postCode"
        },
        "street": {
          "id": "http://jsonschema.net/address/street",
          "type": "string",
          "description": "Street.",
          "name": "street"
        }
      }
    },
    "activeStudy": {
      "id": "http://jsonschema.net/activeStudy",
      "type": "array",
      "description": "A list of active studies if the student is still an active student.",
      "name": "activeStudy",
      "items": {
        "id": "http://jsonschema.net/activeStudy/0",
        "type": "object",
        "description": "An active study if the student is still an active student.",
        "name": "0",
        "properties": {
          "field": {
            "id": "http://jsonschema.net/activeStudy/0/field",
            "type": "object",
            "description": "Study field.",
            "name": "field",
            "properties": {
              "code": {
                "id": "http://jsonschema.net/activeStudy/0/field/code",
                "type": "string",
                "description": "A code for the study field.",
                "name": "code"
              },
              "nameEnglish": {
                "id": "http://jsonschema.net/activeStudy/0/field/nameEnglish",
                "type": "string",
                "description": "Name in english.",
                "name": "nameEnglish"
              },
              "nameNorwegian": {
                "id": "http://jsonschema.net/activeStudy/0/field/nameNorwegian",
                "type": "string",
                "description": "Name in norwegian.",
                "name": "nameNorwegian"
              }
            }
          },
          "place": {
            "id": "http://jsonschema.net/activeStudy/0/place",
            "type": "string",
            "description": "The place where this study activity is conducted. Internal FS place code (Institution_Faculty_Institute_Group).",
            "name": "place"
          },
          "program": {
            "id": "http://jsonschema.net/activeStudy/0/program",
            "type": "object",
            "description": "The program the student attends.",
            "name": "program",
            "properties": {
              "code": {
                "id": "http://jsonschema.net/activeStudy/0/program/code",
                "type": "string",
                "description": "Program code.",
                "name": "code"
              },
              "nameEnglish": {
                "id": "http://jsonschema.net/activeStudy/0/program/nameEnglish",
                "type": "string",
                "description": "Program name in english.",
                "name": "nameEnglish"
              },
              "nameNorwegian": {
                "id": "http://jsonschema.net/activeStudy/0/program/nameNorwegian",
                "type": "string",
                "description": "Program name in norwegian.",
                "name": "nameNorwegian"
              }
            }
          },
          "qualification": {
            "id": "http://jsonschema.net/activeStudy/0/qualification",
            "type": "object",
            "description": "A qualification is a degree, either achieved or in progress. If date is Zero, the degree is in progress. In this instance, the active study might lead to a degree",
            "name": "qualification",
            "properties": {
              "code": {
                "id": "http://jsonschema.net/activeStudy/0/qualification/code",
                "type": "string",
                "description": "Code for the degree.",
                "name": "code"
              },
              "nameEnglish": {
                "id": "http://jsonschema.net/activeStudy/0/qualification/nameEnglish",
                "type": "string",
                "description": "Degree name english.",
                "name": "nameEnglish"
              },
              "nameNorwegian": {
                "id": "http://jsonschema.net/activeStudy/0/qualification/nameNorwegian",
                "type": "string",
                "description": "Degree name norwegian.",
                "name": "nameNorwegian"
              },
              "nameShort": {
                "id": "http://jsonschema.net/activeStudy/0/qualification/nameShort",
                "type": "string",
                "description": "Short name for the degree.",
                "name": "nameShort"
              },
              "place": {
                "id": "http://jsonschema.net/activeStudy/0/qualification/place",
                "type": "string",
                "description": "The place the degree is being worked on. Internal FS place code (Institution_Faculty_Institute_Group).",
                "name": "place"
              },
              "program": {
                "id": "http://jsonschema.net/activeStudy/0/qualification/program",
                "type": "string",
                "description": "Program code for the degree.",
                "name": "program"
              }
            }
          },
          "studyClass": {
            "id": "http://jsonschema.net/activeStudy/0/studyClass",
            "type": "object",
            "description": "The class the student is part of in this active study.",
            "name": "studyClass",
            "properties": {
              "nameEnglish": {
                "id": "http://jsonschema.net/activeStudy/0/studyClass/nameEnglish",
                "type": "string",
                "description": "Class name in english.",
                "name": "nameEnglish"
              },
              "nameNorwegian": {
                "id": "http://jsonschema.net/activeStudy/0/studyClass/nameNorwegian",
                "type": "string",
                "description": "Class name in norwegian.",
                "name": "nameNorwegian"
              },
              "term": {
                "id": "http://jsonschema.net/activeStudy/0/studyClass/term",
                "type": "string",
                "description": "The term the class started (V = Spring, H = Autumn).",
                "name": "term"
              },
              "year": {
                "id": "http://jsonschema.net/activeStudy/0/studyClass/year",
                "type": "integer",
                "description": "The year the class started.",
                "name": "year"
              }
            }
          }
        }
      }
    },
    "qualifications": {
      "id": "http://jsonschema.net/qualifications",
      "type": "array",
      "description": "A list of qualifications.",
      "name": "qualifications",
      "items": {
        "id": "http://jsonschema.net/qualifications/0",
        "type": "object",
        "description": "A qualification is a degree, either achieved or in progress. If date is Zero, the degree is in progress.",
        "name": "0",
        "properties": {
          "areaOfStudy": {
            "id": "http://jsonschema.net/qualifications/0/areaOfStudy",
            "type": "object",
            "description": "Area of study.",
            "name": "areaOfStudy",
            "properties": {
              "code": {
                "id": "http://jsonschema.net/qualifications/0/areaOfStudy/code",
                "type": "string",
                "description": "Code for the area of study.",
                "name": "code"
              },
              "nameEnglish": {
                "id": "http://jsonschema.net/qualifications/0/areaOfStudy/nameEnglish",
                "type": "string",
                "description": "Name of study area english.",
                "name": "nameEnglish"
              },
              "nameNorwegian": {
                "id": "http://jsonschema.net/qualifications/0/areaOfStudy/nameNorwegian",
                "type": "string",
                "description": "Name of study area norwegian.",
                "name": "nameNorwegian"
              }
            }
          },
          "code": {
            "id": "http://jsonschema.net/qualifications/0/code",
            "type": "string",
            "description": "Code for the degree.",
            "name": "code"
          },
          "date": {
            "id": "http://jsonschema.net/qualifications/0/date",
            "type": "string",
            "description": "Date the degree was achieved.",
            "name": "date"
          },
          "nameEnglish": {
            "id": "http://jsonschema.net/qualifications/0/nameEnglish",
            "type": "string",
            "description": "Degree name english.",
            "name": "nameEnglish"
          },
          "nameNorwegian": {
            "id": "http://jsonschema.net/qualifications/0/nameNorwegian",
            "type": "string",
            "description": "Degree name norwegian.",
            "name": "nameNorwegian"
          },
          "nameShort": {
            "id": "http://jsonschema.net/qualifications/0/nameShort",
            "type": "string",
            "description": "Short name for the degree.",
            "name": "nameShort"
          },
          "place": {
            "id": "http://jsonschema.net/qualifications/0/place",
            "type": "string",
            "description": "Place the degree was studied. Internal FS place code (Institution_Faculty_Institute_Group).",
            "name": "place"
          },
          "program": {
            "id": "http://jsonschema.net/qualifications/0/program",
            "type": "string",
            "description": "Degree program code.",
            "name": "program"
          }
        }
      }
    }
  }
}