简体   繁体   English

Flask - 通过Flask-restful vs Class Based Views API制作的API

[英]Flask - APIs made via Flask-restful vs Class Based Views APIs

From the past 1 year or so, I was building APIs using Flask Class Based views. 从过去1年左右开始,我使用Flask Class Based视图构建API。 While documenting my APIs using Swagger (earlier used along with Django), I got to know about Flask-Restful. 在使用Swagger(早先与Django一起使用)记录我的API时,我了解了Flask-Restful。 I went through its documentation, I found out it does the same thing which I was doing from past 1 year or so. 我查看了它的文档,我发现它与我过去1年左右的做法完全相同。 Is there anything special that I'm missing about Flask-Restful or is it just the same? 关于Flask-Restful还有什么特别之处,或者它是一样的吗?

Also, how can I document Class-based views using Swagger? 另外,如何使用Swagger记录基于类的视图?

Take a look at https://github.com/zalando/connexion . 看看https://github.com/zalando/connexion This gives a swagger-first way to build out your app. 这为构建您的应用程序提供了一种昂首阔步的方式。 Similar to swagger-node and swagger-inflector in the https://github.com/swagger-api repository https://github.com/swagger-api存储库中的swagger-nodeswagger-inflector类似

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM