[英]Commenting style guide for restful apis in django / flask
Is there any de-facto commenting style for restful api classes or functions? 宁静的api类或函数是否有实际的注释样式? If there's no such, then how do I apply google / sphinx commenting style to rest apis?
如果没有,我如何将Google / Sphinx评论样式应用于REST API?
For example, how do I write comment for 例如,我如何写评论
class MyListAPI(APIView):
def get(self, request, **kwargs):
...
if the api takes some query string parameters? 如果api需要一些查询字符串参数?
You can check out Swagger extension for flask or Django 您可以检查出扬鞭扩展瓶或Django的
Swagger can generate html page for docs and testing. Swagger可以为文档和测试生成html页面。
You can also look at: 您还可以查看:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.