|
I want to use swagger to make a swagger-description and create client and server Code out of it.The aim I have is to expand the swagger description with my own specifications, so I have to expand the Swagger Code Generator. There are alot of Tools and Im not sure which one I should use. As far as I read I have to expand the Tool Swagger-Codegen, but this Tool is in many other Tools integrated( for example SwaggerCore with the Play! framework) so Im not sure which exactly one I should use. The Programming Langugage I want to use is Java or Javascript. Can you give me an advice which Tools/Frameworks are recommendable for this case? |
swagger-codegen|master⚡ ⇒ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar config-help -l java
CONFIG OPTIONS
sortParamsByRequiredFlag
Sort method arguments to place required parameters before optional parameters. (Default: true)
ensureUniqueParams
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
modelPackage
package for generated models
apiPackage
package for generated api classes
invokerPackage
root package for generated code
groupId
groupId in generated pom.xml
artifactId
artifactId in generated pom.xml
artifactVersion
artifact version in generated pom.xml
sourceFolder
source folder for generated code
localVariablePrefix
prefix for generated code members and local variables
serializableModel
boolean - toggle "implements Serializable" for generated models (Default: false)
bigDecimalAsString
Treat BigDecimal values as Strings to avoid precision loss. (Default: false)
fullJavaUtil
whether to use fully qualified name for classes under java.util (Default: false)
useRxJava
Whether to use the RxJava adapter with the retrofit2 library. (Default: false)
library
library template (sub-template) to use (Default: <default>)
<default> - HTTP client: Jersey client 1.18. JSON processing: Jackson 2.4.2
feign - HTTP client: Netflix Feign 8.1.1
jersey2 - HTTP client: Jersey client 2.6
okhttp-gson - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1
retrofit - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1 (Retrofit 1.9.0)
retrofit2 - HTTP client: OkHttp 2.5.0. JSON processing: Gson 2.4 (Retrofit 2.0.0-beta4). Enable the RxJava adapter using '-DuseRxJava=true'.
dateLibrary
Option. Date library to use
joda - Joda
java8 - Java 8 native
To customize the template, a good starting point is https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/Java