Files
connexion/examples/swagger2/helloworld/hello.py
Christian Clauss 6c4f99051d Upgrade syntax for Python >= 3.6 (#1383)
* pyupgrade --py36-plus **/*.py

* Fix indentation

* Fix indentation
2021-07-04 20:04:22 +02:00

13 lines
312 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()