add: demo server and client
This commit is contained in:
16
demo_server/openapi_server/test/__init__.py
Normal file
16
demo_server/openapi_server/test/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import logging
|
||||
|
||||
import connexion
|
||||
from flask_testing import TestCase
|
||||
|
||||
from openapi_server.encoder import JSONEncoder
|
||||
|
||||
|
||||
class BaseTestCase(TestCase):
|
||||
|
||||
def create_app(self):
|
||||
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
|
||||
Reference in New Issue
Block a user