Error when saving OpenAPI specification in Azure Api Management

Ashan Perera 21 Reputation points
2021-08-31T06:39:50.167+00:00

I have an API in api management service with an openapi spec.127814-api.txt

I want to edit this file to add 1 more definition but I get this error when I click save. "The field serviceUrl is invalid."
Even if I don't change the document and just open it and click save, I still get the same error.

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

Accepted answer
  1. MayankBargali-MSFT 69,576 Reputation points
    2021-09-03T10:49:29.637+00:00

    @Ashan Perera I was able to reproduce the issue if in case I remove the backend HTTP url (i.e. Web service URL). The issue was not reproduce with the attached openapi spec as it already has the field servers. When I tried to edit the YAML the issue was not reproduced with your spec.

    The issue should only observed in case if someone has already imported the API and removed the backend URL then you should oberve the error as "The field serviceUrl is invalid" when you edit it again and doesnot make any changes and tried to save it. As the spec was become invalid as the servers filed doesnot have any URL as you have already deleted them.
    servers:

    • url: 'https://apim-blacksmith-dev.azure-api.net/authapi'

    129078-image.png

    129095-image.png

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Mönig Markus - Munich-MR 1 Reputation point
    2021-09-01T12:26:44.29+00:00

    we have exactly the same problem...