Ask questions and see you at December, 9th, 8pm CET: http://www.ustream.tv/channel/adambien
Also checkout recent episode:
Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions.
Hi Adam,
In a my current project, I received an swagger 2.0 yaml-file from an external system.
I created a rest-client using io.swagger:swagger-codegen-maven-plugin.
But now I've some questions:
1.1 check in the description files like (wsdls, xmls, yamls) and generate the source code during the build
or
1.2 generate the source code once and check in the generated sources
2.1 jersey1 - HTTP client: Jersey client 1.18. JSON processing: Jackson 2.4.2
2.2 jersey2 - HTTP client: Jersey client 2.6
2.3 feign - HTTP client: Netflix Feign 8.1.1. JSON processing: Jackson 2.6.3
2.4 okhttp-gson (default) - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1
2.5 retrofit - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1 (Retrofit 1.9.0)
2.6 retrofit2 - HTTP client: OkHttp 2.5.0. JSON processing: Gson 2.4 (Retrofit 2.0.0-beta2)
2.7 google-api-client - HTTP client: google-api-client 1.23.0. JSON processing: Jackson 2.8.9
2.8 rest-assured - HTTP client: rest-assured : 3.1.0. JSON processing: Gson 2.6.1. Only for Java8
That means that the client generation is fine for stand alone java clients, but not for clients running in an application server.
I thought I should rely on what the application server provides e.g. JAX-RS X.Y-Client-API instead of an actual implementation. But that would mean I can't use the plugin anymore.
The openapi-generator with https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/jaxrs-spec.md could work, but that would mean that the external system needs to migrate from swagger 2.0 to openapi 3.0. They rejected that request.
I could also use the same framework that is used in the target application server (Websphere 9 classic!). After some research I found out that Websphere 9 classic uses Wink?! with Jackson. But this combination is also not provided by the maven-plugin.
Many Thanks,
Martin