{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dishdirectory-com/json-schema/dishdirectory-com-certificate-schema.json",
  "title": "Certificate",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dishdirectory-com-openapi.json#/components/schemas/Certificate",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "The canonical code, XXXX-XXXX-XX."
    },
    "status": {
      "type": "string",
      "enum": [
        "valid",
        "expired",
        "revoked"
      ],
      "description": "valid, expired or revoked. Computed when read."
    },
    "holder": {
      "type": "string",
      "description": "The holder's name when they chose to show it, else Verified credential holder."
    },
    "courseTitle": {
      "type": "string"
    },
    "level": {
      "type": "string",
      "enum": [
        "foundations",
        "practitioner",
        "specialist"
      ]
    },
    "issuedAt": {
      "type": "string",
      "description": "ISO 8601."
    },
    "expiresAt": {
      "description": "ISO 8601, or null when the certificate does not expire.",
      "type": [
        "string",
        "null"
      ]
    },
    "issuer": {
      "type": "string",
      "description": "The site that issued the certificate."
    }
  },
  "required": [
    "code",
    "status",
    "holder",
    "courseTitle",
    "level",
    "issuedAt",
    "expiresAt",
    "issuer"
  ],
  "additionalProperties": false
}