1

Its easy to generate source code from a swagger file because there are many plugins around. I find it difficult to find a documentation which shows me how to create a swagger.yml file from by java code base, build tool is gradle.

I scanned https://springfox.github.io/springfox/docs/current/#configuration-explained - but I did not find something interesting.

https://plugins.gradle.org/plugin/org.hidetake.swagger.generator seems that it only creates source code of swagger.yml

Sercan
  • 2,081
  • 2
  • 10
  • 23
  • 2
    Did you try [this plugin](https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin) ? – Alexandre T Jun 25 '20 at 12:54
  • 1
    Does this answer your question? [How to generate swagger.json using gradle?](https://stackoverflow.com/q/39616160/113116) – Helen Jun 25 '20 at 13:08
  • First comments looks promosing - but I can not use it at the moment because it creates a conflict with an other plugin I use in gradle build (See my questione: https://stackoverflow.com/questions/62588752/howto-handle-clash-of-tasks-for-two-gradle-plugins) Seconds answer - looks a little bit to complicated, but maybe I have to try this one. Thanks for your comments. Why didnt you made "real" answer I could accept? – EhmKah a.k.a. Michael Krauße Jun 26 '20 at 07:09
  • @AlexandreT- the plugin you describe does only output openapi but I need swagger.yaml :-( – EhmKah a.k.a. Michael Krauße Jun 26 '20 at 08:25
  • @AlexandreT- the plugin you describe does only output openapi but I need swagger.yaml :-( – EhmKah a.k.a. Michael Krauße Jun 26 '20 at 08:26
  • @EhmKah a.k.a. Michael Krauße were you able to find a solution for this? – Gayath_chandi Sep 11 '22 at 10:57
  • @Gayath_chandi - Its was a long time ago. Since writting this post we moved to newer version of spring and tried https://springdoc.org/ . I am not sure whether it solved the issue, but you could give it a try. sorry :-( – EhmKah a.k.a. Michael Krauße Sep 16 '22 at 04:07

0 Answers0