Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swagger Sails JS rendered as JSON

Trying to get a swagger document, I followed exactly as suggested by Nitheesh K P in the solution. I am able to get the swagger output when I access the url /swagger/doc but it looks like a REST response. It lacks the nice view that I was expecting, like one in http://swagger.balderdash.io.

In other words, I have followed: https://github.com/tjwebb/sails-swagger and get REST response rather than swagger document.

Please help me figure out what am I missing? Some basic configurations in Sails.

like image 966
Romaan Avatar asked Nov 20 '25 11:11

Romaan


1 Answers

It doesn't seem that either Sails or the Swagger hook you are referencing to, contain Swagger UI. You should install and configure Swagger UI in a separate process - see this SO answer for more details.

like image 59
MrMister Avatar answered Nov 23 '25 01:11

MrMister