{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://static-agent-marketplace.org/schemas/draft/terms.schema.json",
  "title": "Static Agent Marketplace glossary",
  "description": "The glossary in glossary/terms.json, the single owner of the specification's terms. The Terminology section and the glossary page are generated from it.",
  "type": "object",
  "required": ["$schema", "terms"],
  "properties": {
    "$schema": {"const": "https://static-agent-marketplace.org/schemas/draft/terms.schema.json"},
    "terms": {
      "description": "Sorted by id.",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["id", "term", "definition", "source", "aliases_forbidden", "see_also", "since"],
        "properties": {
          "id": {"type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"},
          "term": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9 -]*$", "maxLength": 40},
          "definition": {
            "description": "One or two sentences.",
            "type": "string",
            "minLength": 10,
            "maxLength": 400,
            "pattern": "^[A-Z][^\\n]*\\.$"
          },
          "source": {
            "description": "Where the term comes from: an upstream document, or this spec.",
            "type": "string",
            "minLength": 1
          },
          "aliases_forbidden": {
            "description": "Words that must not be used for this term in normative and project text.",
            "type": "array",
            "uniqueItems": true,
            "items": {"type": "string", "minLength": 2}
          },
          "see_also": {
            "type": "array",
            "uniqueItems": true,
            "items": {"type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"}
          },
          "since": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?$"}
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
