OpenApi3 server object under a specifix path item is being discarded by APIM

Ashok Nautiyal 1 Reputation point
2020-10-09T11:28:48.143+00:00

Hi,

I added both global and path specific server object in my openApi 3 spec which was successfully uploaded to APIM instance, however end point specific server object was disregarded by APIM.

Looks like APIM is not strictly OpenApi3 compliant as I was expecting the server object under path item could be used to redirect the call to another API.

This limitation was also not documented under MS APIM import restrictions.

Thank you,
Ashok

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,784 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,591 Reputation points Microsoft Employee
    2020-10-12T15:19:03.23+00:00

    The API Import Restrictions Doc mentions the following, which I believe describe the behavior that you are seeing

    • server object isn't supported on the API operation level.
    • If many servers are specified, API Management will try to select the first HTTPs URL. If there aren't any HTTPs URLs - the first HTTP URL. If there aren't any HTTP URLs - the server URL will be empty.

    But for both scenarios, you should be able to leverage the set-backend-service policy to change the endpoint to which a request is forwarded to.

    0 comments No comments