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
A blueprint should, for most purposes be indistinguishable from an application, and I think it makes perfect sense to have, say, a flask blueprint for an API, and add a swagger UI to that.
However, the flask handler contains this check:
import flask
if isinstance(doc.app, flask.Flask):
return handler
Which fails, because flask.Blueprint is not a subclass of flask.Flask.
Perhaps the test should be:
import flask.scaffold import Scaffold
if isinstance(doc.app, Scaffold):
return handler
Or perhaps it's safer like this as scaffold doesn't appear to be a documented part of the API:
import flask
if isinstance(doc.app, (flask.Flask, flask.Blueprint)):
return handler
The text was updated successfully, but these errors were encountered:
A blueprint should, for most purposes be indistinguishable from an application, and I think it makes perfect sense to have, say, a flask blueprint for an API, and add a swagger UI to that.
However, the flask handler contains this check:
Which fails, because
flask.Blueprint
is not a subclass offlask.Flask
.Perhaps the test should be:
Or perhaps it's safer like this as scaffold doesn't appear to be a documented part of the API:
The text was updated successfully, but these errors were encountered: