I have been trying to create a client stub for my front-end client using swagger-codegen. Following is the command that I've been using:
java -jar swagger-codegen-cli-2.2.2.jar generate -i "docs-endpoint" -l nodejs-server -o retrofit/ -c config.json
And following is the config :
{
"apiPackage": "com.xyz.api",
"modelPackage": "com.xyz.model",
"groupId":"com.xyz.prototype",
"artifactVersion":"1.0-SNAPSHOT",
"artifactId":"xyz-api",
"library":"retrofit"
}
But I am getting the following error :
Exception in thread "main" java.lang.RuntimeException: unknown library: retrofit
at io.swagger.codegen.DefaultCodegen.setLibrary(DefaultCodegen.java:3159)
at io.swagger.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:409)
at io.swagger.codegen.cmd.Generate.run(Generate.java:232)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:41)
If I remove the library from the config, it's working fine.Could someone please tell what am I doing wrong?