Closed ZongXR closed 3 months ago
In fact, flask-openapi3
is not an extension of Flask
, but an inheritance and enhancement of Flask
.
In fact,
flask-openapi3
is not an extension ofFlask
, but an inheritance and enhancement ofFlask
.
请问通过装饰器app.route能实现参数类型的自动校验以及swagger的自动生成吗?根据demo样例app.get可以,但是实测app.route不可以
app.route是从Flask继承过来的装饰器,所以没有swagger相关功能,感兴趣可以阅读一下源码。
app.route是从Flask继承过来的装饰器,所以没有swagger相关功能,感兴趣可以阅读一下源码。
感谢解答,就是试过不行看完源码才有的疑问。既然是继承自Flask,可以考虑重写相关方法
Very nice and useful framework. But does not meet Flask specifications. In Flask, third party packages initial itself by init_app() method, which is mentioned in flask official document , e.g. Flask-SQLalchemy, Flask-APScheduler, etc. But this framework use Flask by inherited Flask class. Thus, I strongly recommend to improve this by Flask Extension Development Document