Files
pdf/gateway/app/routers/documents.py
T

33 lines
1.2 KiB
Python

"""Document CRUD — upload, list, fetch metadata, delete.
Phase 0 placeholder: every route returns 501 because there is no engine
to parse PDFs and no storage backend wired up. Real implementations land
after Gate G0b (engine interface contracts) and the pybind11 module exist.
"""
from fastapi import APIRouter, HTTPException, status
router = APIRouter(prefix="/documents", tags=["documents"])
_NOT_IMPLEMENTED = "Engine bridge (bindings/python) not yet available — Phase 0 placeholder."
@router.post("", status_code=status.HTTP_501_NOT_IMPLEMENTED)
def upload_document() -> None:
raise HTTPException(status.HTTP_501_NOT_IMPLEMENTED, detail=_NOT_IMPLEMENTED)
@router.get("", status_code=status.HTTP_501_NOT_IMPLEMENTED)
def list_documents() -> None:
raise HTTPException(status.HTTP_501_NOT_IMPLEMENTED, detail=_NOT_IMPLEMENTED)
@router.get("/{document_id}", status_code=status.HTTP_501_NOT_IMPLEMENTED)
def get_document(document_id: str) -> None:
raise HTTPException(status.HTTP_501_NOT_IMPLEMENTED, detail=_NOT_IMPLEMENTED)
@router.delete("/{document_id}", status_code=status.HTTP_501_NOT_IMPLEMENTED)
def delete_document(document_id: str) -> None:
raise HTTPException(status.HTTP_501_NOT_IMPLEMENTED, detail=_NOT_IMPLEMENTED)