Automatically sync OpenAPI/Swagger spec to collection

Hello,

I’ve recently started exploring the use of Swagger documentation with our teams that currently use Postman for API test automation. The ability to import a spec and have it created as a collection in postman is great. As the team continues to develop and refactor the APIs and the spec is therefore updated, is there a way to have these updates to the spec synced with the postman collection that was created upon initial import. I’ve see some converters that seem a bit clunky.

Does Postman plan on building this into the tool at some point?

The ability to have this would streamlined would greatly enhance the tool.

thanks,

Hi @obasekia, Thanks for writing in!
Currently we don’t have a 2 way sync between Postman schema and collection but you can generate new collection from the updated schema and replace the older one. This is just a workaround for now till the time we come up with a solution.
It is definitely in our roadmap and we’ll keep you posted on developments.

Thanks for the response vansh.singh. This is something that myself and many others (from what I’ve read) would be very interested in.

The only concern I have with importing the swagger spec each time is that our test and variables will not be maintained, unless I’m missing something.

I believe even a 1 way sync that would update your Postman collection each time a change has been made to the swagger spec would be very useful.

Thanks,

1 Like

@vansh.singh,
Is there a way through the Postman API to replace the collection?

I’m trying to setup my CI tool to:

  1. upload my OpenAPI spec to Postman (as a collection)
  2. replace the old collection with the new one

Ideally I want a URL that persists so I can share one link to my Postman collection with customers.

Hi @bwillemsen, you can upload your API spec to Postman as a collection but we don’t have collection update flow as of now.
You can go through Postman cloud API documentation to get the API.