首页 > 解决方案 > 自动生成用于 APIDOC 的 api 注释

问题描述

我正在创建 API 文档并决定使用 APIDOC ( https://apidocjs.com/ ) 来生成我的文档。我想知道是否存在可以从我的 python api 文件自动生成内联文档注释的工具。

这是我想为我生成的结果:

"""
@api {get} /user/:id Request User information
@apiName GetUser
@apiGroup User

@apiParam {Number} id Users unique ID.

@apiSuccess {String} firstname Firstname of the User.
@apiSuccess {String} lastname  Lastname of the User.
"""

标签: pythondjango-rest-frameworkapi-doc

解决方案


推荐阅读