Skip to content

Commit

Permalink
Fix missing __init__.py (OpenAPITools#1933)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jyhess authored and wing328 committed Jan 18, 2019
1 parent 87ccff9 commit 7286ec2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ public String getName() {
protected void addSupportingFiles() {
supportingFiles.add(new SupportingFile("conftest.mustache", testPackage, "conftest.py"));
supportingFiles.add(new SupportingFile("__init__test.mustache", testPackage, "__init__.py"));
supportingFiles.add(new SupportingFile("__init__main.mustache", packageName, "__init__.py"));
}
}
12 changes: 12 additions & 0 deletions samples/server/petstore/python-aiohttp/openapi_server/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os
import connexion


def main():
options = {
"swagger_ui": True
}
specification_dir = os.path.join(os.path.dirname(__file__), 'openapi')
app = connexion.AioHttpApp(__name__, specification_dir=specification_dir, options=options)
app.add_api('openapi.yaml', arguments={'title': 'OpenAPI Petstore'}, pass_context_arg_name='request')
app.run(port=8080)

0 comments on commit 7286ec2

Please sign in to comment.