Add example

This commit is contained in:
João Santos
2015-04-29 11:23:45 +02:00
parent 9a89a5af67
commit 3bc60564f5
2 changed files with 39 additions and 0 deletions

12
examples/helloworld/hello.py Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env python3
import connexion
def post_greeting(name: str) -> str:
return 'Hello {name}'.format(name=name)
if __name__ == '__main__':
app = connexion.App(__name__, 9090, specification_dir='swagger/')
app.add_api('helloworld-api.yaml')
app.run()