{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animam-ai/json-schema/animam-ai-list-corpus-response-schema.json",
  "title": "ListCorpusResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animam-ai-openapi.json#/components/schemas/ListCorpusResponse",
  "type": "object",
  "properties": {
    "corpus": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CorpusEntry"
      }
    },
    "pagination": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer"
        },
        "limit": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        },
        "totalPages": {
          "type": "integer"
        }
      },
      "required": [
        "page",
        "limit",
        "total",
        "totalPages"
      ]
    }
  },
  "required": [
    "corpus",
    "pagination"
  ],
  "$defs": {
    "CorpusEntry": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "title": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "priority": {
          "type": "integer"
        },
        "isActive": {
          "type": "boolean"
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "segment": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "slug": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "slug",
            "name"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "title",
        "content",
        "summary",
        "priority",
        "isActive",
        "externalId",
        "source",
        "sourceUrl",
        "segment",
        "createdAt",
        "updatedAt"
      ]
    }
  }
}