OpenAPI 3.1.0 file importation fails in Azure APIM

Guillaume LUDWIG 5 Reputation points
2025-02-05T14:47:19.6333333+00:00

Hi,

When I try to manually import a OpenAPI 3.1.0 file into the API Management in Azure, it fails and complains that the file isn’t valid :

Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specification https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md(schemahttps://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v3.0/schema.yaml).

But my file is OpenAPI 3.1.0, not 3.0.1. In the json, the value "openapi" is "3.1.0".

To my understanding of the documentation, it should support this version.

Any help ?

Regards,

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

3 answers

Sort by: Most helpful
  1. Guillaume LUDWIG 5 Reputation points
    2025-03-14T07:59:56.37+00:00

    Hi, my turn to say sorry for the delay @Anonymous and @RithwikBojja

    Here is a minimal example of a OpenAPI 3.1 file with only one nullable property : 

    {
      "openapi": "3.1.0",
      "info": {
        "title": "Test",
        "version": "1"
      },
      "paths": {
        "/test_path": {
          "get": {
            "responses": {
              "200": {
                "description": "",
                "content": {
                  "application/json": {
                    "schema": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/myObject"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "components": {
        "schemas": {
          "myObject": {
            "type": "object",
            "properties": {
              "myProperty": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      }
    }
    
    

    It has been generated with https://editor-next.swagger.io/ and the result is correctly displayed on it as shown in the attached image. And it works as expected elsewhere (internal tooling, openapi viewers, etc).microsoft_openapi_issue.png

    Except it won’t work on Azure APIM, I attached an image of the error during import.[azure_apim_import_error.png](/api/attachments/42479827-df07-4570-abcd-9e2fd6ac5ca6?platform=QnA)

    I’m quite sure this is a bug in Azure APIM, because the example is valid OpenAPI 3.1 data, and none of the "limitations" listed on APIM documentation are used here. Plus this is really a trivial example, only a single array of an object containing one nullable string.

    Does it help you ?

    0 comments No comments

  2. Kishore Srirama 0 Reputation points
    2025-07-31T15:18:21.97+00:00

    Hi @Shireesha Eeraboina ,

    Do we have an update when Azure APIM will support Open API 3.1 ?

    Regards,

    Kishore.S

    0 comments No comments

  3. Gerard C 0 Reputation points
    2025-11-26T21:58:12.86+00:00

    With the release of NET 10 and Microsoft.OpenApi generating 3.1 by default, full 3.1 support is even more important. I just tested migration from Swagger to Microsoft.OpenAPI v3.1 only to have it fail on the APIM import.

    Do you have any update on plans to fully support the OpenAPI 3.1 generated by Microsoft.OpenAPI?

    Thanks,

    --Gerard


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.