Ejemplo n.º 1
0
 def create_app(self):
     init_db()
     logging.getLogger('connexion.operation').setLevel('ERROR')
     app = connexion.App(__name__, specification_dir='../openapi/')
     app.app.json_encoder = JSONEncoder
     app.add_api('openapi.yaml', pythonic_params=True)
     return app.app
Ejemplo n.º 2
0
def main():
    init_db()

    app = connexion.App(__name__, specification_dir='./openapi/')
    app.app.json_encoder = encoder.JSONEncoder
    app.add_api('openapi.yaml',
                arguments={'title': 'RADON CTT Server API'},
                pythonic_params=True)
    app.run(port=8080)
Ejemplo n.º 3
0
def main():
    init_db()
    # app = connexion.App(__name__, specification_dir='./openapi/')
    app.app.json_encoder = encoder.JSONEncoder
    app.add_api('openapi.yaml',
                arguments={'title': 'RADON CTT Server API'},
                pythonic_params=True)
    serve(app=app, host="0.0.0.0", port=18080)
    db_session.remove()