qwc-services / qwc-services-core

QWC services core
MIT License
9 stars 8 forks source link

Flask-RESTPlus module is not maintained anymore #2

Closed HusseinKabbout closed 4 years ago

HusseinKabbout commented 4 years ago

The flask-restplus module is not maintained anymore, but it was forked into flask-restx. It would be good if we replaced the unmaintained module with flask-restx. The only file that would be affected by this change is qwc_services_core/api.py. Here is a git diff that shows the changes that will be necessary.

diff --git a/qwc_services_core/api.py b/qwc_services_core/api.py
index 176a501..385bb45 100644
--- a/qwc_services_core/api.py
+++ b/qwc_services_core/api.py
@@ -1,7 +1,7 @@
-from flask_restplus import Api as BaseApi
+from flask_restx import Api as BaseApi
 from collections import OrderedDict
 from werkzeug.datastructures import MultiDict
-from flask_restplus.reqparse import Argument
+from flask_restx.reqparse import Argument

 class Api(BaseApi):
@@ -33,7 +33,7 @@ class Api(BaseApi):
 def create_model(api, name, fields):
     """Helper for creating api models with ordered fields

-    :param flask_restplus.Api api: Flask-RESTPlus Api object
+    :param flask_restx.Api api: Flask-restx Api object
     :param str name: Model name
     :param list fields: List of tuples containing ['field name', <type>]
     """
HusseinKabbout commented 4 years ago

Fixed in 626510c9bd3a81a9c7d7b36eed62514b5516b8ae