I am sure there are many of you out there wondering or looking for solutions on how to import swagger JSON to Postman. As the formats are different the import doesn’t work and copying each end-point body is not a feasible solution when you have like 100 API endpoints to test.
Found this amazing npm package which is really openapi-to-postman. My machine is a Windows machine, I am sure in a Linux machine the procedure will be almost similar with just a bit of difference in CLI.
Just open your command prompt in administration mode. I have installed it on my desktop just for my convince. You can install it in any location you prefer

To run the npm command in windows CLI, you need to go to the node_modules folder and access the bin folder. This article has more details.
Then create a file to store the converted data, here the name of the file is collection.json.
openapi2postmanv2 -s C:/Users/Kulsum1922/Desktop/swagger.json -o C:/Users/Kulsum1922/Desktop/collection.json
To know the details of this API usage just visit here.

Then just import the file by clicking on import in Postman.



It took me 3 days to find this solution 😅😅. I hope this has helped anyone who is tearing your hair out, unable to find the solution.
Happy learning 💻💻