Restore rest_api__main__
# limitations under the License.
# ------------------------------------------------------------------------
-import logging
import argparse
from pkg_resources import resource_filename
-
import connexion
-
-from .api_methods_switcher import RestMethodsSwitcherResolver
-
-logger = logging.getLogger(__name__)
-
+from remme.rest_api.api_methods_switcher import RestMethodsSwitcherResolver
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--port', type=int, default=8080)
parser.add_argument('--bind', default='0.0.0.0')
arguments = parser.parse_args()
-
- app = connexion.FlaskApp(__name__, specification_dir='.')
+ app = connexion.App(__name__, specification_dir='.')
app.add_api(resource_filename(__name__, 'openapi.yml'), resolver=RestMethodsSwitcherResolver('remme.rest_api'))
app.run(port=arguments.port, host=arguments.bind)
