Search code examples
swaggerpostmannestjsnestjs-swagger

NestJs Swagger for Postman


Is there a way to import the generated swagger.json to Postman as an collection ?

I tried to import it but the Endpoints are not shown in Postman ?

I am using NestJs and Swagger + Postman


Solution

  • You can use fastify-swagger to export your swagger data using it in Postman after it.

    To generate and download a Swagger JSON file, navigate to http://localhost:3000/api-json (swagger-ui-express) or http://localhost:3000/api/json (fastify-swagger) in your browser (assuming that your Swagger documentation is available under http://localhost:3000/api).

    More informations about openApi with NestJS is available here