简体   繁体   中英

Swagger Sails JS rendered as JSON

Trying to get a swagger document, I followed exactly as suggested by Nitheesh KP 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM