{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmandatorytraining-com/json-schema/getmandatorytraining-com-course-list-schema.json",
  "title": "CourseList",
  "description": "The courses offered for one country, with that country's employer-acceptance wording.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/getmandatorytraining-com-api-openapi.json#/components/schemas/CourseList",
  "type": "object",
  "required": [
    "country",
    "employer_acceptance",
    "courses"
  ],
  "additionalProperties": false,
  "properties": {
    "country": {
      "type": "string",
      "description": "The country answered for, by name."
    },
    "note": {
      "type": "string",
      "description": "When some or all of the courses are US versions: says they follow US guidelines and refer to US emergency numbers and laws."
    },
    "employer_acceptance": {
      "$ref": "#/$defs/AcceptanceText"
    },
    "courses": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Course"
      },
      "description": "The courses, one version each."
    }
  },
  "$defs": {
    "AcceptanceText": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Paragraphs on whether an employer will accept the certificate. Give them to the person as they are, without paraphrasing or shortening them into a yes."
    },
    "Course": {
      "type": "object",
      "description": "One course, as offered in a country. Get a course adds its description, lessons, test and other versions.",
      "required": [
        "slug",
        "title",
        "url",
        "country",
        "price",
        "currency",
        "minutes",
        "certificate_valid_for",
        "summary",
        "audience",
        "enrolment",
        "employer_acceptance"
      ],
      "additionalProperties": false,
      "properties": {
        "slug": {
          "type": "string",
          "description": "The course's identifier, for Get a course."
        },
        "title": {
          "type": "string",
          "description": "The course's name."
        },
        "url": {
          "type": "string",
          "description": "The course's page, where the person can enrol."
        },
        "country": {
          "type": "string",
          "description": "The country this version of the course is written for."
        },
        "price": {
          "type": "string",
          "description": "The certificate's price in the course's own currency, e.g. \"NZ$19.95\"."
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 code."
        },
        "minutes": {
          "type": "integer",
          "description": "About how long the course takes."
        },
        "certificate_valid_for": {
          "type": "string",
          "description": "How long the certificate of completion is valid for, e.g. \"2 years\"."
        },
        "summary": {
          "type": "string",
          "description": "What the course covers, in a sentence or two."
        },
        "audience": {
          "type": "string",
          "description": "Who the course is written for."
        },
        "enrolment": {
          "type": "string",
          "description": "How enrolling works."
        },
        "employer_acceptance": {
          "$ref": "#/$defs/AcceptanceText"
        },
        "description": {
          "type": "string",
          "description": "Get a course only."
        },
        "lessons": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Get a course only: the lesson titles."
        },
        "test_questions": {
          "type": "integer",
          "description": "Get a course only: how many questions the test has."
        },
        "test_pass_mark": {
          "type": "integer",
          "description": "Get a course only: how many correct answers pass."
        },
        "other_versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Version"
          },
          "description": "Get a course only: the same course written for other countries."
        }
      }
    },
    "Version": {
      "type": "object",
      "description": "The same course written for another country.",
      "required": [
        "country",
        "slug",
        "url"
      ],
      "additionalProperties": false,
      "properties": {
        "country": {
          "type": "string",
          "description": "The country this version is written for, by name."
        },
        "slug": {
          "type": "string",
          "description": "This version's identifier, for Get a course."
        },
        "url": {
          "type": "string",
          "description": "This version's page."
        }
      }
    }
  }
}