{
  "$id": "https://learnaboutpearls.com/data/glossary.schema.json",
  "title": "Learn About Pearls: glossary",
  "type": "array",
  "items": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "pattern": "^[a-z0-9-]+$"
      },
      "term": {
        "type": "string"
      },
      "scientific": {
        "type": "boolean"
      },
      "pronunciation": {
        "type": "object",
        "properties": {
          "respelling": {
            "type": "string"
          },
          "ipa": {
            "type": "string"
          }
        },
        "required": [
          "respelling"
        ]
      },
      "definition": {
        "type": "string"
      },
      "note": {
        "type": "string"
      },
      "synonyms": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "related": {
        "default": [],
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "coveredIn": {
        "type": "string"
      },
      "sources": {
        "minItems": 1,
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9-]*$"
        }
      }
    },
    "required": [
      "id",
      "term",
      "definition",
      "sources"
    ]
  }
}
