Since the last version, a warning is shown upon starting sanic.
UserWarning: Setting variables on Blueprint instances is deprecated and will be removed in version 21.9. You should change your Blueprint instance to use instance.ctx._spec instead.
from sanic import Sanic
from sanic.response import json
from sanic_openapi import swagger_blueprint
app = Sanic(name="sanic_openapi_test")
app.blueprint(swagger_blueprint)
@app.route("/")
async def test(request):
return json({"hello": "world"})
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8000)
Hello 🖖,
Since the last version, a warning is shown upon starting sanic.
UserWarning: Setting variables on Blueprint instances is deprecated and will be removed in version 21.9. You should change your Blueprint instance to use instance.ctx._spec instead.
I created a pull request that fixes this warning
Thanks,