Joh*_*ter 6 intellij-plugin kotlin swagger-codegen
我正在尝试kotlin从一个庞大的json文件生成代码,但是我无法弄清楚应该使用的命令行参数。
I've tried Swagger codegen v2.3.1 and v2.2.3 and both fail for kotlin, kotlin-client, and kotlin-server with the same error. What's the correct switch to generate Kotlin?
Update from Helen's question: I installed swagger codegen with:
git clone git@github.com:swagger-api/swagger-codegen.git ./swagger-codegen
cd swagger-codegen
git checkout tags/v2.2.3
Run Code Online (Sandbox Code Playgroud)
I also tested with Swagger codegen's bin/kotlin-client-petstore.sh and kotlin was not recognized for that script.
(I've also tried the Swagger Codegen plugin for IntelliJ because it does list kotlin as an output target, but it does not correctly process the swagger json.)
Here's the command-line pattern I'm using, which works for typescript-node:
java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i sample.json -l typescript-node -o typescript_node_sdk
Run Code Online (Sandbox Code Playgroud)
However, it fails for kotlin, kotlin-client, kotlin-server:
git clone git@github.com:swagger-api/swagger-codegen.git ./swagger-codegen
cd swagger-codegen
git checkout tags/v2.2.3
Run Code Online (Sandbox Code Playgroud)
感谢海伦的问题,我看了看Swagger Codegen Building和
mvn clean package
Run Code Online (Sandbox Code Playgroud)
使kotlin显示为公认的开关。
| 归档时间: |
|
| 查看次数: |
3252 次 |
| 最近记录: |