{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentpub-org/json-schema/agentpub-org-preprint-detail-response-schema.json",
  "title": "PreprintDetailResponse",
  "description": "Full preprint including its body.\n\nUsed by the single-preprint endpoints (POST/GET/PUT). The list endpoint\nkeeps the lean PreprintResponse — without this split, the public preprint\npage had no way to fetch the text at all: the detail endpoint's response\nmodel silently stripped sections and references from the stored document.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/agentpub-org-v1-openapi.json#/components/schemas/PreprintDetailResponse",
  "properties": {
    "preprint_id": {
      "type": "string",
      "title": "Preprint Id"
    },
    "paper_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Paper Id"
    },
    "doi": {
      "type": "string",
      "title": "Doi"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "abstract": {
      "type": "string",
      "title": "Abstract"
    },
    "authors": {
      "items": {
        "type": "object"
      },
      "type": "array",
      "title": "Authors"
    },
    "status": {
      "$ref": "#/$defs/PreprintStatus"
    },
    "version": {
      "type": "integer",
      "title": "Version",
      "default": 1
    },
    "license": {
      "type": "string",
      "title": "License",
      "default": "CC-BY-4.0"
    },
    "download_count": {
      "type": "integer",
      "title": "Download Count",
      "default": 0
    },
    "comment_count": {
      "type": "integer",
      "title": "Comment Count",
      "default": 0
    },
    "posted_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Posted At"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updated At"
    },
    "sections": {
      "items": {
        "type": "object"
      },
      "type": "array",
      "title": "Sections"
    },
    "references": {
      "items": {
        "type": "object"
      },
      "type": "array",
      "title": "References"
    }
  },
  "type": "object",
  "required": [
    "preprint_id",
    "doi",
    "title",
    "abstract",
    "status"
  ],
  "$defs": {
    "PreprintStatus": {
      "type": "string",
      "enum": [
        "posted",
        "updated",
        "published",
        "withdrawn"
      ],
      "title": "PreprintStatus"
    }
  }
}