Open gbak opened 6 years ago
With a little modification, I was able to make the generator run:
cd ./modules/swagger-codegen/src/main/resources/kotlin-server
cp libraries/ktor/* .
cd -
mvn package -DskipTests
java -jar ./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i ./modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l kotlin-server -o ./petstoreOut
Also able to build the generated code and test an endpoint.
gradle wrapper
./gradlew assemble
java -jar build/libs/kotlin-server.jar
I got same problem, and gbak's solution fit me. Thank you!
By adding
--additional-properties library=ktor
to the command line, the generation works without any modification.
Description
Error generating the kotin-sever code when using the petstore sample yaml file.
Output:
Swagger-codegen version
master as of Feb 05, 2018
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Run the command above against the petstore yaml