Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically generate a collection from an openAPI / Swagger endpoint?

Generating a Postman collection from an openAPI / Swagger documentation JSON file is already possible using the Postman API Client (a desktop app).

However, for purposes of programmatically modifying an existing collection using the NodeJs-based Postman SDK I'd like to be able to automate the process of generating a postman collection.

Whether that is via a command line tool (I haven't found any such tool), Postman API REST request (I haven't been able to find out how) or otherwise, does not really matter.

As long as it is possible to do without pressing a button in some app.

Is this possible at all?

like image 750
Michael Trouw Avatar asked Sep 17 '25 09:09

Michael Trouw


1 Answers

Postman uses this module in the APP to convert from OpenAPI to a Postman Collection.

https://github.com/postmanlabs/OpenAPI-to-Postman

This should provide you with a programmatical way of doing this outside of the app.

like image 178
Danny Dainton Avatar answered Sep 19 '25 07:09

Danny Dainton