openapi-to-postman icon indicating copy to clipboard operation
openapi-to-postman copied to clipboard

Support for import of servers defined in Open API spec

Open Kiran-B opened this issue 6 years ago • 9 comments

Open API spec allows definition of multiple servers. The import of such specs are successful. But Postman appears to choose/use the first server URL.

Requested behavior:

  • Server URL and protocol translates to two variables. Approach may extend to other server variables as defined in spec.
  • Multiple environments are automatically created. one-each for the server definition. The environment defines the values of server variables (like URL and PROTOCOL) as defined in the open api spec.

Multiple server URLs are often used to target multiple deployment environment like Dev, Stage and Prod. Hence the suggestion to creation Postman Environment for each server configuration.

Kiran-B avatar Dec 18 '18 04:12 Kiran-B

I also have a use case of test, stage, and prod server urls. As well as a few product team urls. Importing the OpenApi 3.0.3 document into Postman only generates the first server url defined in the document. This is not useful to teams because individuals will have to manually enter the additional servers urls each time the document is updated, which will lead to individuals saving their own Postman json files rather than importing from the common source of truth.

jziggas avatar Jul 06 '21 17:07 jziggas

Added in 2018 but still commenting in 2022. Does an ETA exist for this feature?

fosternb10 avatar Jan 06 '22 03:01 fosternb10

Possible fix that solves my use case; I'm not sure how to contribute to this project directly, so I've made changes on a fork.

https://github.com/AlexKotsc/openapi-to-postman/commit/36c959f75ea81809814578574f248320f2a968f3

AlexKotsc avatar Feb 18 '22 09:02 AlexKotsc

I also have this requirement, and would like to see this implemented.

lougeo avatar Apr 13 '22 16:04 lougeo

Please, this implementation is needed. I've had to manually copy the other server urls and associated data into postman environment variable every time. Not nice at all :(

noryson avatar Apr 20 '22 09:04 noryson

This is a quite necessary for those who generate open API documentation first and then import it to postman. Is there some reason not to implement it? 😢

dgmora avatar Nov 27 '22 08:11 dgmora

+1, this would be very beneficial for our team

glebignatieff avatar Dec 01 '23 14:12 glebignatieff

+1, not having this will be pushing us to use a different solution.

vordimous avatar Apr 11 '24 18:04 vordimous