生成swagger_client
- 下载swagger-client codegen cli
Wget https://oss.sonatype.org/content/repositories/releases/io/swagger/swagger-codegen-cli
- 找到需要测试项目的swagger的yaml
- 生成swagger_client
生成的为python的安装包,里面包含setup文件
java -jar swagger-codegen-cli-2.2.x.jar generate -i swagger.yaml -l python -o ./aa/
- 安装swagger_client
python setup.py build
python setup.py install
网友评论