mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
Fix missing __init__.py (#1933)
This commit is contained in:
parent
f4133e726d
commit
17218117b9
@ -45,5 +45,6 @@ public class PythonAiohttpConnexionServerCodegen extends PythonAbstractConnexion
|
||||
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"));
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
Loading…
Reference in New Issue
Block a user