Update to use flask-restx
This commit is contained in:
parent
e7d4e70445
commit
25bc34a38f
|
@ -1,6 +1,6 @@
|
||||||
from flask import Flask, jsonify
|
from flask import Flask, jsonify
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
from flask_restplus import Api
|
from flask_restx import Api
|
||||||
|
|
||||||
db = SQLAlchemy()
|
db = SQLAlchemy()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_accepts import accepts, responds
|
from flask_accepts import accepts, responds
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
from flask.wrappers import Response
|
from flask.wrappers import Response
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_accepts import accepts, responds
|
from flask_accepts import accepts, responds
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
from flask.wrappers import Response
|
from flask.wrappers import Response
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ BASE_ROUTE = "other_api"
|
||||||
|
|
||||||
def register_routes(api, app, root="api"):
|
def register_routes(api, app, root="api"):
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask_restplus import Api
|
from flask_restx import Api
|
||||||
|
|
||||||
bp = Blueprint("other_api", __name__)
|
bp = Blueprint("other_api", __name__)
|
||||||
api = Api(bp, title="Another API with separate Swagger docs", version="0.1.0")
|
api = Api(bp, title="Another API with separate Swagger docs", version="0.1.0")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_accepts import accepts, responds
|
from flask_accepts import accepts, responds
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
from flask.wrappers import Response
|
from flask.wrappers import Response
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_accepts import accepts, responds
|
from flask_accepts import accepts, responds
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
from flask.wrappers import Response
|
from flask.wrappers import Response
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
2
app/third_party/app/__init__.py
vendored
2
app/third_party/app/__init__.py
vendored
|
@ -1,7 +1,7 @@
|
||||||
def create_bp(env=None):
|
def create_bp(env=None):
|
||||||
from flask import Blueprint, jsonify
|
from flask import Blueprint, jsonify
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
from flask_restplus import Api, Resource, Namespace
|
from flask_restx import Api, Resource, Namespace
|
||||||
|
|
||||||
bp = Blueprint("Example third party API", __name__)
|
bp = Blueprint("Example third party API", __name__)
|
||||||
api = Api(bp, title="Flaskerific API", version="0.1.0")
|
api = Api(bp, title="Flaskerific API", version="0.1.0")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_accepts import accepts, responds
|
from flask_accepts import accepts, responds
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
from flask.wrappers import Response
|
from flask.wrappers import Response
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,4 @@ pytz==2019.2
|
||||||
six==1.12.0
|
six==1.12.0
|
||||||
SQLAlchemy==1.3.6
|
SQLAlchemy==1.3.6
|
||||||
Werkzeug==0.15.5
|
Werkzeug==0.15.5
|
||||||
|
flask-restx==0.1.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user