mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-06 04:19:26 +00:00
16 lines
361 B
Python
Executable File
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"})
|