I have developpe some Rest web service documented by swagger, using swagger-springmvc annotions.
Now, I want to use swagger-editor to generate client side Rest web service code, but swagger-editor require Yaml or Json file. Do you know if there is a way to generate this file ?
Thanks at advance
EDIT :
It's can be done by using swagger-mvn-plugin , but I don't found an example on how to do it ?
Best Answer
I reply to my self :) . You can generate client and server side documentation (yaml, json and html) by using swagger-maven-plugin
Add this to your pom.xml:
You can download *.hbs template at this address: https://github.com/kongchen/swagger-maven-example
Execute
mvn swagger:generate
Json documentation will be generated at your project/generated/swagger/
directory. Past it on this address : http://editor.swagger.ioAnd generate what ever you want (Server side or Client side API in your preferred technology)