fabric8io / ipaas-quickstarts

quickstarts for the fabric8 project
Apache License 2.0
66 stars 86 forks source link

Proposal - support swagger-codgen for REST services on f8 #1065

Open stevef1uk opened 8 years ago

stevef1uk commented 8 years ago

As Swagger is the defacto tool to design REST APIs and swagger-codegen provides code generation for client and server side (including Java JAX RS, which works well with maven) it would be nice to be able to easily run the generated code on f8. Then you could use APIMan to expose the APIs apply policies over them etc.

I have looked at the generated code from Swagger-codegen and the sample Ipass-quickstarts REST code and there is a bit of a gap to overcome. Some form of tooling or swagger-codegen would be very nice.

KurtStam commented 8 years ago

Related to https://github.com/fabric8io/fabric8/issues/5463

stevef1uk commented 8 years ago

I did put up an example project of this working on fabric8 if you want to take a look:

https://github.com/stevef1uk/ipaas-quickstarts.git

in quick start -> spring-boot -> jars

Just made the commit that makes this available

KurtStam commented 8 years ago

Thanks @stevef1uk! Your example generates the server side right? In that use case where would the user obtain the swagger document? I can see the case for generating the client side based on a swagger document obtained from a service, but yours is opposite :).

stevef1uk commented 8 years ago

Yes, it is simply a server side RESTful service creased by swagger-code-gen that contains the full swagger documentation running on fabric8. I added a README that shows how to view and use the swagger output.