flask-openapi3 icon indicating copy to clipboard operation
flask-openapi3 copied to clipboard

Does not meet Flask specifications

Open ZongXR opened this issue 1 year ago • 3 comments

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

ZongXR avatar Aug 04 '24 03:08 ZongXR

In fact, flask-openapi3 is not an extension of Flask, but an inheritance and enhancement of Flask.

luolingchun avatar Aug 04 '24 04:08 luolingchun

In fact, flask-openapi3 is not an extension of Flask, but an inheritance and enhancement of Flask.

请问通过装饰器app.route能实现参数类型的自动校验以及swagger的自动生成吗?根据demo样例app.get可以,但是实测app.route不可以

ZongXR avatar Aug 04 '24 10:08 ZongXR

app.route是从Flask继承过来的装饰器,所以没有swagger相关功能,感兴趣可以阅读一下源码。

luolingchun avatar Aug 11 '24 08:08 luolingchun

app.route是从Flask继承过来的装饰器,所以没有swagger相关功能,感兴趣可以阅读一下源码。

感谢解答,就是试过不行看完源码才有的疑问。既然是继承自Flask,可以考虑重写相关方法

ZongXR avatar Aug 17 '24 06:08 ZongXR