INNER CODE UNIT · Python
get_openapi
iamgreggarcia/codesherpa · localserver/main.py:105
async def get_openapi():
"""
Endpoint to serve the openapi specification file.
"""
return app.openapi()
@app.get("/upload")
async def upload_page(request: Request):
return HTMLResponse(
content=open("templates/upload.html", "r").read(), status_code=200
)
@app.post("/upload")
async def upload_file(file: UploadFile = File(...)):
"""
Upload a file.