vert-x3-experiments icon indicating copy to clipboard operation
vert-x3-experiments copied to clipboard

Creating swagger json with vertx/vertx.web

Open IdanFridman opened this issue 10 years ago • 5 comments

Hi, Is there any example how to create Swagger json out of our vertx/vertx.web API. So we can point swagger-ui to look at it (exactly like in Spring)

Thanks.

IdanFridman avatar Oct 25 '15 09:10 IdanFridman

Short answer, no :)

At the moment we have no swagger generator, I'd recommend to use a similar approach to the one used with raml:

http://vertx.io/blog/contract-driven-rest-services-with-vert-x3/

You can achive the same with swagger by creating the json using the swagger editor, and then serve it using the static files handler.

pmlopes avatar Oct 25 '15 10:10 pmlopes

Thanks for your response. "You can achive the same with swagger by creating the json using the swagger editor.." The thing is that I need the app to create the swagger-json from the code for me and than serv it to swagger-ui (and not vice-versa as you suggested).

In you example you creating the json manually.

IdanFridman avatar Oct 25 '15 11:10 IdanFridman

@pmlopes Almost three years now, is there a solution ? Can a json swagger document be generated ?

@IdanFridman how did you solve this , is there a direct solution ? This repo almost solves it, still testing though !!

SyCode7 avatar Jul 12 '18 20:07 SyCode7

@SyCode7 I never set any goal to implement that, there are some experiments by the community in that area. I'd suggest to join the gitter channel or the Google group and query around.

pmlopes avatar Jul 13 '18 04:07 pmlopes

@pmlopes okay, i kinda misunderstood your project's aim. Thanks for the swift answer.

SyCode7 avatar Jul 14 '18 13:07 SyCode7