{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://satoshi-interface.com/api/schema.json",
  "title": "Beyond Shadows' Light — Archive",
  "description": "Das lebendige Archiv: Werk-Metadaten, 5 Akte, alle Szenen im Volltext.",
  "type": "object",
  "required": [
    "apiVersion",
    "work",
    "acts"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "apiVersion": {
      "type": "string"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "work": {
      "type": "object",
      "required": [
        "title",
        "interface",
        "author",
        "sceneCount",
        "actCount"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "interface": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "autoTranslated": {
          "type": "boolean"
        },
        "author": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "orcid": {
              "type": "string",
              "format": "uri"
            },
            "location": {
              "type": "string"
            }
          }
        },
        "sceneCount": {
          "type": "integer"
        },
        "actCount": {
          "type": "integer"
        },
        "canonical": {
          "type": "string",
          "format": "uri"
        },
        "mirror": {
          "type": "string",
          "format": "uri"
        },
        "license": {
          "type": "string"
        },
        "narrativeRule": {
          "type": "string"
        }
      }
    },
    "acts": {
      "type": "array",
      "minItems": 5,
      "maxItems": 5,
      "items": {
        "type": "object",
        "required": [
          "act",
          "key",
          "title",
          "url",
          "scenes"
        ],
        "properties": {
          "act": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "scenes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "n",
                "title",
                "text"
              ],
              "properties": {
                "n": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "location": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}