Files
connexion/examples/openapi3/helloworld_async/hello.py
Robbe Sneyders 5a0c292b44 Add async app
2022-12-26 20:51:46 +01:00

16 lines
361 B
Python
Executable File

import connexion
from starlette.responses import PlainTextResponse
async def test():
pass
async def post_greeting(name: str) -> PlainTextResponse:
await test()
return f"Hello {name}", 201
app = connexion.AsyncApp(__name__, port=9090, specification_dir="openapi/")
app.add_api("helloworld-api.yaml", arguments={"title": "Hello World Example"})