{
  "openapi": "3.1.1",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Legalarxiv API",
    "version": "0.6.0",
    "description": "Read-only discovery across the full bibliographic paper index and the separate, cursor-paginated versioned archive. Index entries preserve source evidence and limitations; indexing does not imply independent scholarly assessment or reproduction. Connected MCP offers search_papers and get_paper_record for the full index, alongside the existing archive tools. Direct anonymous HTTP returned 403 / Cloudflare 1010 on 2026-10-15; these contracts document implemented routes while hosting access is restricted.",
    "license": {
      "name": "Pilot metadata: CC0 intended where lawful",
      "identifier": "CC0-1.0"
    },
    "x-pilot": true
  },
  "servers": [
    {
      "url": "https://legalarxiv.org"
    }
  ],
  "tags": [
    {
      "name": "Discovery",
      "description": "Bounded search over work families and ongoing research efforts."
    },
    {
      "name": "Records",
      "description": "Exact-version, status-bearing research records."
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "getApiIndex",
        "summary": "Describe the API and current live coverage",
        "tags": [
          "Discovery"
        ],
        "responses": {
          "200": {
            "description": "API index",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIndex"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/catalog": {
      "get": {
        "operationId": "listCatalog",
        "summary": "Search the bounded research catalog",
        "description": "Returns lightweight discovery summaries only. Exact records are available from their version endpoints. Cursors are opaque and bound to the query, filters, sort order, and result snapshot.",
        "tags": [
          "Discovery"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "works",
                "efforts"
              ],
              "default": "all"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "work_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "ai_role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "newest",
                "changed",
                "title"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor returned by the preceding page; valid only with the same query and filters.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded catalog page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/works": {
      "get": {
        "operationId": "listWorkFamilies",
        "summary": "Search work families",
        "description": "Alias for the catalog with scope fixed to works. All catalog query, filter, sort, cursor, and limit parameters are accepted.",
        "tags": [
          "Discovery"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "work_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "ai_role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "newest",
                "changed",
                "title"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded work-family page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/efforts": {
      "get": {
        "operationId": "listResearchEfforts",
        "summary": "Search ongoing research efforts",
        "description": "Alias for the catalog with scope fixed to efforts. All catalog query, filter, sort, cursor, and limit parameters are accepted.",
        "tags": [
          "Discovery"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "work_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "ai_role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "newest",
                "changed",
                "title"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded research-effort page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/works/{work}/versions/{version}": {
      "parameters": [
        {
          "name": "work",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 120
          }
        },
        {
          "name": "version",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$"
          }
        }
      ],
      "get": {
        "operationId": "getExactResearchRecord",
        "summary": "Get one exact-version research record",
        "description": "Returns ordered authorship, section-scoped responsibility, explicit coverage, status assertions, exact source sections, reconstructed case notes, a claim trace, version events, provenance, rights, and typed links. Send Accept: application/ld+json or format=jsonld for JSON-LD.",
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "jsonld"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exact-version research record",
            "headers": {
              "Link": {
                "description": "Typed OpenAPI, JSON-LD context, and HTML discovery links",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Short status-bearing revalidation policy",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Digest": {
                "description": "SHA-256 digest of the canonical immutable record packet",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Strong entity tag containing the packet digest",
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "description": "Packet publication time",
                "schema": {
                  "type": "string"
                }
              },
              "X-Robots-Tag": {
                "schema": {
                  "type": "string",
                  "const": "noindex"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchRecord"
                }
              },
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonLdRecord"
                }
              }
            }
          },
          "404": {
            "description": "Record not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Record packet failed an integrity or storage check",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "head": {
        "operationId": "headExactResearchRecord",
        "summary": "Inspect exact-version packet identity without downloading its body",
        "tags": [
          "Records"
        ],
        "responses": {
          "200": {
            "description": "Record packet metadata",
            "headers": {
              "Content-Digest": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer"
                }
              },
              "Link": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Record not found"
          },
          "503": {
            "description": "Packet integrity metadata is unavailable"
          }
        }
      }
    },
    "/api/v1/works/{work}/versions/{version}/quality": {
      "parameters": [
        {
          "name": "work",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 120
          }
        },
        {
          "name": "version",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$"
          }
        },
        {
          "name": "packet",
          "in": "query",
          "required": false,
          "description": "Select a particular immutable packet of this exact version; omission selects the current designation.",
          "schema": {
            "type": "string",
            "pattern": "^(?:sha256:)?[0-9a-f]{64}$"
          }
        }
      ],
      "get": {
        "operationId": "getQualityScreeningReceipt",
        "summary": "Get the current public quality screening state",
        "description": "A sanitized companion to the immutable record packet. It contains policy, check outcomes, assessment references, and public limitations only. Private evaluator evidence is excluded. This response is not cached because expiry, policy suspension, or subsequent assessments can require rechecking. A legacy record does not imply a passed assessment.",
        "tags": [
          "Records"
        ],
        "responses": {
          "200": {
            "description": "Current screening state",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicQualityReceipt"
                }
              }
            }
          },
          "400": {
            "description": "Invalid packet digest"
          },
          "404": {
            "description": "Public record or packet not found"
          },
          "503": {
            "description": "Current receipt or packet integrity is unavailable"
          }
        }
      },
      "head": {
        "operationId": "headQualityScreeningReceipt",
        "summary": "Check whether the current screening receipt is available",
        "tags": [
          "Records"
        ],
        "responses": {
          "200": {
            "description": "Receipt available",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            }
          },
          "400": {
            "description": "Invalid packet digest"
          },
          "404": {
            "description": "Record not found"
          },
          "503": {
            "description": "Receipt unavailable"
          }
        }
      }
    },
    "/api/v1/works/{work}/versions/{version}/packets/{digest}": {
      "parameters": [
        {
          "name": "work",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 120
          }
        },
        {
          "name": "version",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$"
          }
        },
        {
          "name": "digest",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      ],
      "get": {
        "operationId": "getImmutableResearchRecordPacket",
        "summary": "Get one digest-addressed immutable record packet",
        "tags": [
          "Records"
        ],
        "responses": {
          "200": {
            "description": "Canonical JSON packet",
            "headers": {
              "Content-Digest": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer"
                }
              },
              "Link": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchRecord"
                }
              }
            }
          },
          "404": {
            "description": "Packet not found"
          },
          "503": {
            "description": "Packet failed an integrity or storage check"
          }
        }
      },
      "head": {
        "operationId": "headImmutableResearchRecordPacket",
        "summary": "Inspect immutable packet identity without downloading its body",
        "tags": [
          "Records"
        ],
        "responses": {
          "200": {
            "description": "Immutable packet metadata",
            "headers": {
              "Content-Digest": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "description": "Packet not found"
          },
          "503": {
            "description": "Packet integrity metadata is unavailable"
          }
        }
      }
    },
    "/api/v1/papers": {
      "get": {
        "operationId": "searchPaperIndex",
        "summary": "Search source-linked bibliographic summaries (not archive admissions)",
        "description": "Separate from the versioned archive catalog. Entries preserve source URLs, coverage, limitations and research connections, with publication status, affiliations and author-linked artifacts where recorded. Independent scholarly assessment is pending. q matches author, title, affiliation and topic terms; other filters use exact listed tags.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "title"
              ],
              "default": "newest"
            }
          },
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded paper index page, with next_offset, assessment boundary and source-linked entries"
          },
          "404": {
            "description": "Requested id is not in the filtered index"
          }
        },
        "x-mcp-tools": [
          "search_papers",
          "get_paper_record"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApiIndex": {
        "type": "object",
        "required": [
          "name",
          "api_version",
          "schema_version",
          "status",
          "as_of",
          "coverage",
          "catalog",
          "works",
          "research_efforts",
          "catalog_capabilities",
          "exact_record_template",
          "openapi",
          "jsonld_context",
          "mcp",
          "interpretation_rules"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "api_version": {
            "type": "string"
          },
          "schema_version": {
            "type": "string",
            "const": "legalarxiv.record.v3"
          },
          "status": {
            "const": "pilot"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "coverage": {
            "type": "object",
            "required": [
              "works",
              "research_efforts",
              "exact_versions",
              "source_sections",
              "reconstructed_notes",
              "description"
            ],
            "properties": {
              "works": {
                "type": "integer",
                "minimum": 0
              },
              "research_efforts": {
                "type": "integer",
                "minimum": 0
              },
              "exact_versions": {
                "type": "integer",
                "minimum": 0
              },
              "source_sections": {
                "type": "integer",
                "minimum": 0
              },
              "reconstructed_notes": {
                "type": "integer",
                "minimum": 0
              },
              "description": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "catalog": {
            "type": "string",
            "format": "uri"
          },
          "works": {
            "type": "string",
            "format": "uri"
          },
          "research_efforts": {
            "type": "string",
            "format": "uri"
          },
          "catalog_capabilities": {
            "$ref": "#/components/schemas/CatalogCapabilities"
          },
          "exact_record_template": {
            "type": "string"
          },
          "quality_receipt_template": {
            "type": "string"
          },
          "example_exact_record": {
            "type": "string",
            "format": "uri"
          },
          "openapi": {
            "type": "string",
            "format": "uri"
          },
          "jsonld_context": {
            "type": "string",
            "format": "uri"
          },
          "mcp": {
            "type": "object",
            "required": [
              "availability",
              "endpoint",
              "protocol_version",
              "mode"
            ],
            "properties": {
              "availability": {
                "type": "string"
              },
              "endpoint": {
                "type": "string",
                "format": "uri"
              },
              "protocol_version": {
                "type": "string"
              },
              "mode": {
                "const": "read_only"
              }
            },
            "additionalProperties": false
          },
          "interpretation_rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "Completeness": {
        "type": "object",
        "required": [
          "response_transport_truncated",
          "reconstruction_state",
          "author_attested",
          "source_section_index_complete",
          "source_top_level_technical_sections",
          "represented_by_reconstructed_notes",
          "indexed_only_sections",
          "section_count_is_atomic_episode_count",
          "passage_level_reconstruction_complete",
          "attempt_sets_complete",
          "source_artifacts_mirrored"
        ],
        "properties": {
          "response_transport_truncated": {
            "type": "boolean"
          },
          "reconstruction_state": {
            "type": "string"
          },
          "author_attested": {
            "type": "boolean"
          },
          "source_section_index_complete": {
            "type": "boolean"
          },
          "source_top_level_technical_sections": {
            "type": "integer",
            "minimum": 0
          },
          "represented_by_reconstructed_notes": {
            "type": "integer",
            "minimum": 0
          },
          "indexed_only_sections": {
            "type": "integer",
            "minimum": 0
          },
          "section_count_is_atomic_episode_count": {
            "type": "boolean"
          },
          "passage_level_reconstruction_complete": {
            "type": "boolean"
          },
          "attempt_sets_complete": {
            "type": "boolean"
          },
          "source_artifacts_mirrored": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Author": {
        "type": "object",
        "required": [
          "id",
          "name",
          "source_metadata_name",
          "position",
          "corresponding",
          "source_roles",
          "responsibility_scope"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source_metadata_name": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "minimum": 1
          },
          "corresponding": {
            "type": "boolean"
          },
          "source_roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "responsibility_scope": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "StatusAssertion": {
        "type": "object",
        "required": [
          "id",
          "target_id",
          "facet",
          "value",
          "asserted_by",
          "basis",
          "checked_at",
          "scope",
          "known_gaps",
          "meaning"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "facet": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "asserted_by": {
            "type": "string"
          },
          "basis": {
            "type": "string"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "type": "string"
          },
          "known_gaps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meaning": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SourceSection": {
        "type": "object",
        "required": [
          "id",
          "number",
          "title",
          "contributors",
          "contributor_display",
          "responsibility_basis",
          "passage_id",
          "source_selector",
          "source_url",
          "mapping_state",
          "case_note_id"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "contributors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contributor_display": {
            "type": "string"
          },
          "responsibility_basis": {
            "type": "string"
          },
          "passage_id": {
            "type": "string"
          },
          "source_selector": {
            "type": "string"
          },
          "source_url": {
            "type": "string",
            "format": "uri"
          },
          "mapping_state": {
            "enum": [
              "mapped_note",
              "indexed_source_only"
            ]
          },
          "case_note_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "CaseNote": {
        "type": "object",
        "required": [
          "id",
          "section_id",
          "passage_id",
          "outcome_group",
          "reported_result",
          "ai_role",
          "human_intervention",
          "validation",
          "access",
          "warning"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "section_id": {
            "type": "string"
          },
          "passage_id": {
            "type": "string"
          },
          "outcome_group": {
            "type": "string"
          },
          "reported_result": {
            "type": "string"
          },
          "ai_role": {
            "type": "string"
          },
          "human_intervention": {
            "type": "string"
          },
          "validation": {
            "type": "string"
          },
          "access": {
            "type": "string"
          },
          "warning": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ClaimTrace": {
        "type": "object",
        "required": [
          "id",
          "versionId",
          "proposition",
          "claimClass",
          "inferentialScope",
          "provenanceClass",
          "occurrences",
          "evidence",
          "contributions",
          "evaluation",
          "limitations",
          "versionEventId"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "versionId": {
            "type": "string"
          },
          "proposition": {
            "type": "string"
          },
          "claimClass": {
            "type": "string"
          },
          "inferentialScope": {
            "type": "string"
          },
          "provenanceClass": {
            "type": "string"
          },
          "occurrences": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "passageId",
                "selector",
                "role",
                "sourceUrl"
              ],
              "properties": {
                "passageId": {
                  "type": "string"
                },
                "selector": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "sourceUrl": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "additionalProperties": false
            }
          },
          "evidence": {
            "type": "object",
            "required": [
              "id",
              "kind",
              "description",
              "access",
              "independentPlatformVerification"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "access": {
                "type": "string"
              },
              "independentPlatformVerification": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "contributions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "actorClass",
                "attribution",
                "contribution",
                "evidencePassageId",
                "responsibility"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "actorClass": {
                  "enum": [
                    "human",
                    "model"
                  ]
                },
                "attribution": {
                  "type": "string"
                },
                "contribution": {
                  "type": "string"
                },
                "evidencePassageId": {
                  "type": "string"
                },
                "responsibility": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "evaluation": {
            "type": "object",
            "required": [
              "id",
              "status",
              "basis",
              "evaluator",
              "checkedAt"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "basis": {
                "type": "string"
              },
              "evaluator": {
                "type": "string"
              },
              "checkedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": false
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "versionEventId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PublicQualityReceipt": {
        "type": "object",
        "required": [
          "state",
          "receipt_id",
          "profile_id",
          "policy_version",
          "checked_at",
          "valid_until",
          "assessment_ids",
          "checks",
          "limitations"
        ],
        "properties": {
          "state": {
            "enum": [
              "screened",
              "recheck_required",
              "legacy_unassessed"
            ]
          },
          "receipt_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "policy_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "valid_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "assessment_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "criterion",
                "outcome"
              ],
              "properties": {
                "criterion": {
                  "type": "string"
                },
                "outcome": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "ResearchRecord": {
        "type": "object",
        "required": [
          "schema_version",
          "id",
          "family_id",
          "source_identifiers",
          "exact_version",
          "canonical_url",
          "api_url",
          "as_of",
          "invariants",
          "completeness",
          "identity",
          "discovery",
          "authorship",
          "research_signal",
          "status_assertions",
          "source_sections",
          "case_notes",
          "claim_traces",
          "version_events",
          "provenance",
          "rights",
          "links",
          "notice"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "const": "legalarxiv.record.v3"
          },
          "id": {
            "type": "string"
          },
          "family_id": {
            "type": "string"
          },
          "source_identifiers": {
            "type": "object",
            "required": [
              "family",
              "exact_version"
            ],
            "properties": {
              "family": {
                "type": "string"
              },
              "exact_version": {
                "type": "string"
              },
              "doi": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            },
            "additionalProperties": false
          },
          "exact_version": {
            "type": "string"
          },
          "canonical_url": {
            "type": "string",
            "format": "uri"
          },
          "api_url": {
            "type": "string",
            "format": "uri"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "invariants": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "completeness": {
            "$ref": "#/components/schemas/Completeness"
          },
          "identity": {
            "type": "object",
            "required": [
              "title",
              "abstract",
              "object_type",
              "inferential_class",
              "initial_submitted_at",
              "version_submitted_at",
              "subjects"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "abstract": {
                "type": "string"
              },
              "object_type": {
                "type": "string"
              },
              "inferential_class": {
                "type": "string"
              },
              "initial_submitted_at": {
                "type": "string",
                "format": "date-time"
              },
              "version_submitted_at": {
                "type": "string",
                "format": "date-time"
              },
              "subjects": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "source_pages": {
                "type": [
                  "integer",
                  "string",
                  "null"
                ]
              },
              "fixity": {
                "type": "object"
              }
            },
            "additionalProperties": true
          },
          "discovery": {
            "type": "object",
            "required": [
              "entry_kind",
              "work_type",
              "version_ordinal",
              "summary",
              "strongest_limitation",
              "byline",
              "identifier_text",
              "language",
              "jurisdiction",
              "subjects",
              "primary_subject",
              "ai_roles",
              "status",
              "evaluation_state",
              "latest_change"
            ],
            "properties": {
              "entry_kind": {
                "enum": [
                  "work",
                  "effort"
                ]
              },
              "work_type": {
                "type": "string"
              },
              "version_ordinal": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100000
              },
              "summary": {
                "type": "string"
              },
              "strongest_limitation": {
                "type": "string"
              },
              "byline": {
                "type": "string"
              },
              "identifier_text": {
                "type": "string"
              },
              "language": {
                "type": "string"
              },
              "jurisdiction": {
                "type": "string"
              },
              "subjects": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "type": "string"
                }
              },
              "primary_subject": {
                "type": "string"
              },
              "ai_roles": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "type": "string"
                }
              },
              "status": {
                "type": "string"
              },
              "evaluation_state": {
                "type": "string"
              },
              "latest_change": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "authorship": {
            "type": "object",
            "required": [
              "ordered_authors",
              "source_responsibility_note",
              "platform_attestation"
            ],
            "properties": {
              "ordered_authors": {
                "type": "array",
                "minItems": 1,
                "maxItems": 2000,
                "items": {
                  "$ref": "#/components/schemas/Author"
                }
              },
              "source_responsibility_note": {
                "type": "string"
              },
              "platform_attestation": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "research_signal": {
            "type": "object",
            "required": [
              "primary_contribution",
              "scope_boundary",
              "safe_short_orientation"
            ],
            "properties": {
              "primary_contribution": {
                "type": "string"
              },
              "scope_boundary": {
                "type": "string"
              },
              "safe_short_orientation": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "status_assertions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusAssertion"
            }
          },
          "source_sections": {
            "type": "array",
            "maxItems": 10000,
            "items": {
              "$ref": "#/components/schemas/SourceSection"
            }
          },
          "case_notes": {
            "type": "array",
            "maxItems": 10000,
            "items": {
              "$ref": "#/components/schemas/CaseNote"
            }
          },
          "claim_traces": {
            "type": "array",
            "maxItems": 10000,
            "items": {
              "$ref": "#/components/schemas/ClaimTrace"
            }
          },
          "version_events": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "version",
                "date",
                "sourceChange",
                "typedImpact",
                "statusEffect"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "sourceChange": {
                  "type": "string"
                },
                "typedImpact": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "statusEffect": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "provenance": {
            "type": "object",
            "required": [
              "source",
              "reconstruction_basis",
              "source_content_trust_boundary",
              "relations_kept_separate",
              "creation_mode",
              "human_review_state"
            ],
            "properties": {
              "source": {
                "type": "string",
                "format": "uri"
              },
              "reconstruction_basis": {
                "type": "string"
              },
              "source_content_trust_boundary": {
                "type": "string"
              },
              "relations_kept_separate": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "creation_mode": {
                "type": "string"
              },
              "human_review_state": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "rights": {
            "type": "object",
            "required": [
              "source_license",
              "metadata_license",
              "controlling_notice"
            ],
            "properties": {
              "source_license": {
                "type": "object",
                "required": [
                  "name",
                  "uri"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "uri": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "additionalProperties": false
              },
              "metadata_license": {
                "type": "string"
              },
              "controlling_notice": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "links": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "format": "uri"
            }
          },
          "notice": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "JsonLdRecord": {
        "type": "object",
        "required": [
          "@context",
          "@graph"
        ],
        "properties": {
          "@context": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "@graph": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": false
      },
      "CatalogCapabilities": {
        "type": "object",
        "required": [
          "scopes",
          "pagination",
          "filters",
          "sorts",
          "complete_records_embedded"
        ],
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "enum": [
                "all",
                "works",
                "efforts"
              ]
            }
          },
          "pagination": {
            "type": "string"
          },
          "filters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sorts": {
            "type": "array",
            "items": {
              "enum": [
                "relevance",
                "newest",
                "changed",
                "title"
              ]
            }
          },
          "complete_records_embedded": {
            "const": false
          }
        },
        "additionalProperties": false
      },
      "CatalogQuery": {
        "type": "object",
        "required": [
          "q",
          "scope",
          "subject",
          "workType",
          "aiRole",
          "status",
          "sort",
          "cursor",
          "limit"
        ],
        "properties": {
          "q": {
            "type": "string",
            "maxLength": 200
          },
          "scope": {
            "enum": [
              "all",
              "works",
              "efforts"
            ]
          },
          "subject": {
            "type": "string",
            "maxLength": 100
          },
          "workType": {
            "type": "string",
            "maxLength": 100
          },
          "aiRole": {
            "type": "string",
            "maxLength": 100
          },
          "status": {
            "type": "string",
            "maxLength": 100
          },
          "sort": {
            "enum": [
              "relevance",
              "newest",
              "changed",
              "title"
            ]
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "additionalProperties": false
      },
      "CatalogSectionMatch": {
        "type": "object",
        "required": [
          "id",
          "number",
          "title",
          "contributors",
          "mappingState",
          "href"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "contributors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mappingState": {
            "enum": [
              "mapped_note",
              "indexed_source_only"
            ]
          },
          "href": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CatalogFacetOption": {
        "type": "object",
        "required": [
          "value",
          "count"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CatalogItem": {
        "type": "object",
        "required": [
          "id",
          "entryKind",
          "slug",
          "exactVersionId",
          "exactVersionLabel",
          "title",
          "fullTitle",
          "authorsDisplay",
          "summary",
          "strongestLimitation",
          "workType",
          "primarySubject",
          "subjects",
          "aiRoles",
          "status",
          "evaluationState",
          "qualityScreening",
          "language",
          "jurisdiction",
          "firstPublishedAt",
          "currentVersionAt",
          "latestEventAt",
          "latestChange",
          "relationships",
          "meta",
          "href",
          "sectionMatchCount",
          "matches"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "entryKind": {
            "enum": [
              "work",
              "effort"
            ]
          },
          "slug": {
            "type": "string"
          },
          "exactVersionId": {
            "type": "string"
          },
          "exactVersionLabel": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "fullTitle": {
            "type": "string"
          },
          "authorsDisplay": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "strongestLimitation": {
            "type": "string"
          },
          "workType": {
            "type": "string"
          },
          "primarySubject": {
            "type": "string"
          },
          "subjects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "aiRoles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          },
          "evaluationState": {
            "type": "string"
          },
          "qualityScreening": {
            "type": "object",
            "required": [
              "state",
              "receiptId",
              "href"
            ],
            "properties": {
              "state": {
                "enum": [
                  "screened",
                  "recheck_required",
                  "legacy_unassessed"
                ]
              },
              "receiptId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "href": {
                "type": "string",
                "format": "uri"
              }
            },
            "additionalProperties": false
          },
          "language": {
            "type": "string"
          },
          "jurisdiction": {
            "type": "string"
          },
          "firstPublishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "currentVersionAt": {
            "type": "string",
            "format": "date-time"
          },
          "latestEventAt": {
            "type": "string",
            "format": "date-time"
          },
          "latestChange": {
            "type": "string"
          },
          "relationships": {
            "type": "object",
            "required": [
              "versions",
              "sourceSections",
              "reconstructedNotes",
              "claimTraces"
            ],
            "properties": {
              "versions": {
                "type": "integer",
                "minimum": 0
              },
              "sourceSections": {
                "type": "integer",
                "minimum": 0
              },
              "reconstructedNotes": {
                "type": "integer",
                "minimum": 0
              },
              "claimTraces": {
                "type": "integer",
                "minimum": 0
              }
            },
            "additionalProperties": false
          },
          "meta": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "href": {
            "type": "string"
          },
          "sectionMatchCount": {
            "type": "integer",
            "minimum": 0
          },
          "matches": {
            "type": "array",
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/CatalogSectionMatch"
            }
          }
        },
        "additionalProperties": false
      },
      "CatalogResponse": {
        "type": "object",
        "required": [
          "schema_version",
          "as_of",
          "corpus",
          "query",
          "page",
          "filters",
          "data",
          "notice"
        ],
        "properties": {
          "schema_version": {
            "const": "legalarxiv.catalog-page.v1"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "corpus": {
            "type": "object",
            "required": [
              "workFamilies",
              "researchEfforts",
              "exactVersions",
              "sourceSections",
              "reconstructedNotes",
              "updatedAt"
            ],
            "properties": {
              "workFamilies": {
                "type": "integer",
                "minimum": 0
              },
              "researchEfforts": {
                "type": "integer",
                "minimum": 0
              },
              "exactVersions": {
                "type": "integer",
                "minimum": 0
              },
              "sourceSections": {
                "type": "integer",
                "minimum": 0
              },
              "reconstructedNotes": {
                "type": "integer",
                "minimum": 0
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": false
          },
          "query": {
            "$ref": "#/components/schemas/CatalogQuery"
          },
          "page": {
            "type": "object",
            "required": [
              "limit",
              "returned",
              "totalMatching",
              "rangeStart",
              "rangeEnd",
              "hasPreviousPage",
              "hasNextPage",
              "previousCursor",
              "nextCursor",
              "cursorAccepted"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 50
              },
              "returned": {
                "type": "integer",
                "minimum": 0,
                "maximum": 50
              },
              "totalMatching": {
                "type": "integer",
                "minimum": 0
              },
              "rangeStart": {
                "type": "integer",
                "minimum": 0
              },
              "rangeEnd": {
                "type": "integer",
                "minimum": 0
              },
              "hasPreviousPage": {
                "type": "boolean"
              },
              "hasNextPage": {
                "type": "boolean"
              },
              "previousCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cursorAccepted": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "filters": {
            "type": "object",
            "required": [
              "subjects",
              "workTypes",
              "aiRoles",
              "statuses"
            ],
            "properties": {
              "subjects": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CatalogFacetOption"
                }
              },
              "workTypes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CatalogFacetOption"
                }
              },
              "aiRoles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CatalogFacetOption"
                }
              },
              "statuses": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CatalogFacetOption"
                }
              }
            },
            "additionalProperties": false
          },
          "data": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/CatalogItem"
            }
          },
          "notice": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
