{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mantismusic.app/docs/schemas/1.0/mantis.schema.json",
  "title": "Mantis site manifest (mantis.json), format 1",
  "type": "object",
  "required": ["mantis", "id", "url", "name", "updated", "catalogue"],
  "properties": {
    "mantis": { "const": 1 },
    "id": { "type": "string", "pattern": "^urn:uuid:[0-9a-f-]{36}$" },
    "url": { "type": "string", "pattern": "^https?://.+/$" },
    "name": { "type": "string", "minLength": 1 },
    "summary": { "type": "string" },
    "icon": { "type": "string", "pattern": "^https?://" },
    "updated": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$" },
    "generator": { "type": "object", "required": ["name"], "properties": { "name": { "type": "string" }, "version": { "type": "string" } } },
    "catalogue": { "type": "string", "pattern": "^https?://" },
    "feeds": { "type": "object", "properties": { "rss": { "type": "string", "pattern": "^https?://" } } },
    "activitypub": {
      "type": "object",
      "required": ["actor"],
      "properties": { "actor": { "type": "string", "pattern": "^https?://" }, "handle": { "type": "string", "pattern": "^@[^@]+@[^@]+$" } }
    },
    "directories": { "type": "array", "items": { "type": "string" } },
    "vouches": { "type": "array", "items": { "type": "string", "pattern": "^https?://" } },
    "flags": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["site", "reason"],
        "properties": { "site": { "type": "string", "pattern": "^https?://" }, "reason": { "enum": ["spam", "impersonation", "stolen", "abuse"] } }
      }
    },
    "alsoKnownAs": { "type": "array", "items": { "type": "string", "pattern": "^https?://" } },
    "movedTo": { "type": "string", "pattern": "^https?://" }
  }
}
