Files
connexion/examples/swagger2/helloworld/hello.py
2022-06-25 23:50:52 +02:00

14 lines
313 B
Python
Executable File

#!/usr/bin/env python3
import connexion
def post_greeting(name: str) -> str:
return f"Hello {name}"
if __name__ == "__main__":
app = connexion.FlaskApp(__name__, port=9090, specification_dir="swagger/")
app.add_api("helloworld-api.yaml", arguments={"title": "Hello World Example"})
app.run()