You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
blp=Blueprint(
"objects",
"objects",
url_prefix="/objects",
description="Operations on objects",
)
@blp.route("/")classAnyObject(MethodView):
pass
How would that look like using flask-openapi3 ? It's a bit lost, currently I have:
blp=APIBlueprint(
"objects",
__name__,
url_prefix="/objects",
description="Operations on objects",
)
api_view=APIView()
@api_view.route("/")classAnyObject:
passblp.register_api_view(api_view) # this doesn't work
I din't understand the difference between APIView and APIBlueprint, nor why APIBlueprint seems to be required as a replacement for flask.MethodView ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Using
flask_smorest
, I have routes defined like:How would that look like using flask-openapi3 ? It's a bit lost, currently I have:
I din't understand the difference between APIView and APIBlueprint, nor why APIBlueprint seems to be required as a replacement for
flask.MethodView
?Environment:
Beta Was this translation helpful? Give feedback.
All reactions