diff --git a/app/api.py b/app/api.py index 6c81a72..ec106f9 100644 --- a/app/api.py +++ b/app/api.py @@ -4,8 +4,8 @@ import spacy import srsly # type: ignore -from fastapi import Body, FastAPI -from starlette.responses import RedirectResponse +from fastapi import Body, FastAPI, status +from starlette.responses import PlainTextResponse, RedirectResponse from app.entity_models import Request, Response from app.spacy_extractor import SpacyExtractor @@ -22,6 +22,11 @@ extractor = SpacyExtractor(nlp) +@app.get("/healthz", response_model=str, status_code=status.HTTP_200_OK) +def health(): + return PlainTextResponse(".") + + @app.get("/", include_in_schema=False) def docs_redirect(): return RedirectResponse("/docs")