title: How do I swagger generate Kotlin?
body: <p>I'm trying to generate <code>kotlin</code> code from a swagger json file, and I can't figure out the command-line parameters that should be used. </p>
  
  <p>I've tried Swagger codegen <code>v2.3.1</code> and <code>v2.2.3</code> and both fail for <code>kotlin</code>, <code>kotlin-client</code>, and <code>kotlin-server</code> with the same error. What's the correct switch to generate Kotlin?</p>
  
  <p>Update from Helen's question: I installed swagger codegen with:</p>
  
  <pre><code>git clone git@github.com:swagger-api/swagger-codegen.git ./swagger-codegen
  cd swagger-codegen
  git checkout tags/v2.2.3
  </code></pre>
  
  <p>I also tested with Swagger codegen's <code>bin/kotlin-client-petstore.sh</code> and <code>kotlin</code> was not recognized for that script.</p>
  
  <p>(I've also tried the <a href="https://github.com/jimschubert/intellij-swagger-codegen/" rel="noreferrer" title="Swagger Codegen plugin for IntelliJ">Swagger Codegen plugin for IntelliJ</a> because it does list <code>kotlin</code> as an output target, but it does not correctly process the swagger json.)</p>
  
  <p>Here's the command-line pattern I'm using, which works for <code>typescript-node</code>:</p>
  
  <pre><code>java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i sample.json -l typescript-node -o typescript_node_sdk
  </code></pre>
  
  <p>However, it fails for <code>kotlin</code>, <code>kotlin-client</code>, <code>kotlin-server</code>:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i sample.json -l kotlin -o kotlin_sdk
  Exception in thread "main" java.lang.RuntimeException: Can't load config class with name kotlin Available: android
  aspnet5
  async-scala
  csharp
  dart
  flash
  python-flask
  go
  java
  jaxrs
  jaxrs-cxf
  jaxrs-resteasy
  inflector
  javascript
  javascript-closure-angular
  jmeter
  nodejs-server
  objc
  perl
  php
  python
  qt5cpp
  ruby
  scala
  scalatra
  silex-PHP
  sinatra
  slim
  spring-mvc
  dynamic-html
  html
  swagger
  swagger-yaml
  swift
  tizen
  typescript-angular
  typescript-node
  akka-scala
  CsharpDotNet2
  clojure
  haskell-servant
  
  at io.swagger.codegen.CodegenConfigLoader.forName(CodegenConfigLoader.java:31)
  at io.swagger.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:346)
  at io.swagger.codegen.cmd.Generate.run(Generate.java:221)
  at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:36)
  Caused by: java.lang.ClassNotFoundException: kotlin
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:264)
  at io.swagger.codegen.CodegenConfigLoader.forName(CodegenConfigLoader.java:29)
  ... 3 more
  </code></pre>