Summary
In this chapter, we covered how the Nest.js swagger module makes use of the existing decorators you use in your application to create a swagger v2 specification document. We also covered all the additional decorators the Nest.js swagger module provides to enhance the information in the swagger document. We also setup the example blog application to expose the swagger UI.
Use the Nest.js swagger module to not only document your application’s controllers, but to also provide UI for testing your application. If you fully document your application, the swagger UI can be an excellent replacement UI or provide an easy testing area that you or your users can use instead of having to watch for network calls in your applications real UI. The swagger UI can also be a great substitute for tools like Postman.
If you don’t wish to use the Swagger UI or expose your swagger document with you application in a production environment, remember you can always write the file to disk...