swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.88k stars 6.03k forks source link

Generating code for creating a Spring-Shell application #2135

Open guyhanael opened 8 years ago

guyhanael commented 8 years ago

I was thinking creating a new option to generate a Spring-Shell application from swagger specification. The new generator will create the code to be compliant with [https://github.com/spring-projects/spring-shell] WDYT ?

wing328 commented 8 years ago

@guyhanael thanks for the suggestion. Do you mean adding another library options in Java API client to support Spring-Shell?

guyhanael commented 8 years ago

@wing328 - I played a bit with the codegen and used the Java Spring MVC option. I sew it generated the REST controllers. What I was thinking is generating code that will create a spring shell classes and generate something like the rest-shell spring project. i.e. command line tool (like the swagger UI)that will be able to run any API that was part of the swagger configuration.

wing328 commented 8 years ago

java-springmvc is for server stub. I think java template (API client) would be more suitable for your case as you're trying to implement another client that talks to a RESTful backend if I understand correctly.

guyhanael commented 8 years ago

@wing328 , you understood correctly, thanks for pointing me in the correct direction. So what I want to do is to wrap this with the spring shell classes and annotations which will produce a CLI tool to invoke these APIs. Elegendly I can clone and submit a pull request, but I would like to get some more feedback from the community if they find it useful before I start. What is the process I need to follow ?

wing328 commented 8 years ago

Besides posting here, you can also start a discussion in Swagger Group to gather feedback from the community.