trying to setup connexion.AioHttpApp() with aiohttp-cors for async routes fails

Solution 1:

You must use app.app

app = connexion.AioHttpApp(__name__, specification_dir='./swagger/')
app.add_api('swagger.yaml')
cors = aiohttp_cors.setup(app.app)