You will never be able to generate a good API definition from code without 
adding more to it.

The reason is simple – the descriptions are just not there.

 

You can actually use swagger-core to generate something without adding any 
annotations to your code. 

That would still be lacking of descriptions and you can add that manually later.

If you want it to work at build time and not deployment time, you can look at 
the maven plugin - https://github.com/kongchen/swagger-maven-plugin. 

For that you’d still want to add the annotations, but you won’t need to expose 
it at runtime.

We are not affiliated with that plugin, so won’t be able to provide support, 
but it should be good.

 

The other option is to not generate it from the code but use something like 
http://editor.swagger.io to manually write your API description.

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of David Blickstein 
<dabl...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Thursday, 22 June 2017 at 6:31
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: Generate Swagger specification from Java source code

 

Ron, I appreciate your response, but I don't think that page provides a method 
to do what I need to do. 

 

That page is just a page on how to introduce Swagger into a web application.   
What I'm looking to do is have a way to generate a Swagger specification file 
WITHOUT having to do that.

 

I have found a github project that may accomplish that by providing a Javadoc 
doclet that writes out a Swagger specification instead of Javadoc documentation:

         https://github.com/conorroche/swagger-doclet

 

But I'd be interested to know of any other solutions.

 



On Wednesday, June 21, 2017 at 1:23:49 PM UTC-4, Ron wrote: 

Sure, take a look at 
https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-Jersey-1.X-Project-Setup-1.5.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of David Blickstein 
<dab...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Wednesday, 21 June 2017 at 6:18
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Generate Swagger specification from Java source code

 

I have to think this question may have been asked here before.  But I couldn't 
find a way to search the forum, and though I've seen the same question asked in 
other forums, I've yet to see an answer. 

 

What I want to do is described very simply:  I'm looking for a tool that 
generates a Swagger specification file from  JAX-RS annotated Java source code.

A key element is that it works off the source code, not off a deployment.

Does such a tool exist?  Or is there some sort of method by which I can 
accomplish this?

Thanks

-- 
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-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
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-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to