官方介绍地址:https://github.com/swagger-api/swagger-codegen
1.安装JDK【略】
2.下载jar包
wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.41/swagger-codegen-cli-3.0.41.jar -O swagger-codegen-cli.jar
或
Invoke-WebRequest -OutFile swagger-codegen-cli.jar https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.41/swagger-codegen-cli-3.0.41.jar
3.将Swagger的JSON描述文件放置到同目录下
4.执行生成命令
java -jar swagger-codegen-cli-3.0.41.jar generate -i ./swagger.json -l typescript-axios -o ./generate --additional-properties modelPropertyNaming=original stringEnums=true
标签:codegen,Swagger,cli,jar,TS,41,Codegen,3.0,swagger
From: https://www.cnblogs.com/fanqisoft/p/17377683.html