Browse Source

🎨 Auto format

pull/14570/head
pre-commit-ci-lite[bot] 7 months ago
committed by GitHub
parent
commit
ce76e78f6b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 19
      test_app.py

19
test_app.py

@ -8,21 +8,24 @@ app = FastAPI(
```bash
curl -X GET http://127.0.0.1:8000/
"""
""",
)
class HealthResponse(BaseModel):
status: str
status: str
@app.get("/")
def root():
return "Hello World"
return "Hello World"
@app.get(
"/health",
response_model=HealthResponse,
summary="Health check endpoint",
tags=["System"]
"/health",
response_model=HealthResponse,
summary="Health check endpoint",
tags=["System"],
)
def health_check():
return HealthResponse(status="healthy")
return HealthResponse(status="healthy")

Loading…
Cancel
Save