夸张的模式生成器
py2swagger的Python项目详细描述
python openapi规范生成器
自动或半自动生成OpenAPI Specification(又名 为用python和著名的 框架,例如:
- Django REST Framework (drf>;=2;django>;=1.6)
- Falcon(猎鹰>;=0.3)
- 烧瓶
- 瓶子
- 以及您拥有的框架
仅支持v2 openapi规范
为什么?
此工具是作为我们使用的文档工具包的一部分编写的 在我们每天的工作中。工具包的主要思想是 可以自动创建和更新文档
我们工具包的其他部分是:
安装
$ pip install py2swagger
使用量
usage: py2swagger [-h] [-c CONFIG] [-r ROOT] [-o OUTPUT] {falcon,drf,simple} ... Swagger schema builder optional arguments: -h, --help show this help message and exit -c CONFIG, --config CONFIG Path to config file -r ROOT, --root ROOT Path to project root. Default is current directory or configuration file location -o OUTPUT, --output OUTPUT Output file (Default stdout) plugins: {falcon,drf,simple} falcon drf simple Plugin for all applications
运行测试
python setup.py test