How can the same specification be used in two portals with two different target servers?

I have an OpenAPI Specification with the following server declaration:

servers:
  - url: https://myprodinstance.apigee.net/myservice
  - url: https://mydevinstance.apigee.net/myservice

In the specification editor, this is handled correctly, with a dropdown showing the different servers.

I can deploy the same specification to my dev and prod portals, but both portals use the first URL, with no option to choose. I have tried using the different formats described in the OpenAPI specification, but sadly it doesn't seem that the integrated portal is able to handle any of them.

The only solution I can think of is to have Production and Development version of the same specification, and to manually copy the contents of the Development version to Production, remembering to update the URL in the process.

Is there a better way to use the same specification in different environments?

0 3 169
3 REPLIES 3

Not applicable

Thanks for this. It's surprising that this is still a problem two years later.

Are there any workarounds?

I didn't get any solution yet.