Tom Ghyselinck f7943257c5 Python flask pythonic params (#2374)
* Using connexion `pythonic_params` support while keeping OpenAPI spec file correct with reference to the original spec file.

* - Add `camelCase` query parameter which shows the incorrectnes of the conversion of the OpenAPI spec file in Python server implementation(s).

* Also use `pythonic_params=True` for the `python-aiohttp` implementation.

* - Updated Python related samples.

* The unit tests must provide the correct query parameters.

* - Updated Python related samples.
2019-03-24 10:36:26 +08:00

22 lines
687 B
Python

import logging
import pytest
import os
import connexion
@pytest.fixture
def client(loop, aiohttp_client):
logging.getLogger('connexion.operation').setLevel('ERROR')
options = {
"swagger_ui": True
}
specification_dir = os.path.join(os.path.dirname(__file__), '..',
'openapi_server',
'openapi')
app = connexion.AioHttpApp(__name__, specification_dir=specification_dir,
options=options)
app.add_api('openapi.yaml', pythonic_params=True,
pass_context_arg_name='request')
return loop.run_until_complete(aiohttp_client(app.app))