Swagger YAML to HTML like in swagger-editor

3,689 views
Skip to first unread message

Michal Bubnár

unread,
Jul 28, 2016, 6:04:50 AM7/28/16
to Swagger
Hi,

I have created pretty long swagger definition file for the REST API of the company I work at, and now my task is to convert it to HTML. I was able to do this using either Swagger Codegen or using bootprint-swagger and using command line, which is also required, because this generation is supposed to be automated during build of our products.

Now here's what I couldn't find anywhere. I really like the live preview created in Swagger Editor, I think it's the most beautiful of all HTMLs generated and somehow I would like to generate exactly same HTML here for the company. Is this somehow possible? I would really like to have this, since it also has Try This Operation, color theme is really nice and basically that would be the way to go and everyone here would be satisfied.

Can somebody help me with this? Thank you in advance :)

Ron Ratovsky

unread,
Jul 29, 2016, 1:44:31 PM7/29/16
to swagger-sw...@googlegroups.com

I don’t think there’s a way to do it. Keep in mind that if you’re looking for the try it out functionality, then it’s not really just HTML and in that case you just go with swagger-ui.

If you’re looking for something more static to be generated in your build process, then yeah, you can use swagger-codegen (where you can customize the template to fit the looks of swagger-editor) or use tools like swagger2markup.

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

Michal Bubnár

unread,
Aug 1, 2016, 9:30:10 AM8/1/16
to Swagger
I thought so, that is a pity. But a little workaround is written in this post:


Which actually works pretty well, and if you are not satisfied with this, you can also try swagger2markup tool, but I just read about it, haven't actuall tried.

Dňa piatok, 29. júla 2016 19:44:31 UTC+2 Ron napísal(-a):

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages