Openapi Generator是Swagger Codegen的分支,但功能更加强大
1.安装JDK【略】
2.下载jar包
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.5.0/openapi-generator-cli-6.5.0.jar -O openapi-generator-cli.jar
或者
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.5.0/openapi-generator-cli-6.5.0.jar
3.将Swagger的JSON描述文件放置到同目录下
4.执行生成命令
java -jar openapi-generator-cli-6.5.0.jar generate -i ./swagger.json -g typescript-rxjs -o ./generate
标签:Generator,generator,jar,TS,openapi,6.5,org,Openapi,cli
From: https://www.cnblogs.com/fanqisoft/p/17383989.html