Swagger codegen server stub development lifecycle question

113 views
Skip to first unread message

Gregg Fiehler

unread,
Oct 5, 2016, 6:45:18 PM10/5/16
to Swagger
Hi,
  I wanted to hear how some people handle the full lifecycle of an api when using codegen for the server.

 Scenario:
  1. create new api using swagger editor 
  2. use swagger.json and codegen to generate server stub (java spring-mvc, but it could be others) for api
  3. write business logic 
  4. deploy api
  5. business request to update api with new features
  6. ??? what is the best way to do this:
    1. update yaml file with changes and generate new stub and copy existing business logic to new code
    2. write new code into existing code base and then generate new swagger.json from code
    3. ...
Trying to understand the options of how to handle this when using code generation.

Any suggestions and experiences would be appreciated.

Gregg

tony tam

unread,
Oct 5, 2016, 7:08:24 PM10/5/16
to swagger-sw...@googlegroups.com
There are many ways to do this, from using a maven plugin in your build process to writing scripts to do the codegen merge.  Not to make a product plug, but if you watch this:


You’ll see another way using commercial tooling.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jim Kerak

unread,
Dec 4, 2016, 10:27:01 PM12/4/16
to Swagger
I'm using this: https://github.com/zalando-stups/swagger-codegen-tooling to generate the server interfaces in JAX-RS (although you could also use SpringMVC) during every maven build.
Reply all
Reply to author
Forward
0 new messages