Azure API Management importing openapi generating random names

Petula Lau 0 Reputation points
2024-09-30T02:55:31.63+00:00

Hi, I have the following openapi.json, and when I import it into the azure api management portal it generates a long name like: RestApiAdminLocationSourcesGet200ApplicationJsonResponse for the definition for 200 status

How do I change it so its a specific name? I realize that the type=array is the problem

 "/rest/api/admin/locationSources": {
      "get": {
        "tags": [
          "Admin Location Source API"
        ],
        "summary": "Admin - Get all location sources",
        "description": "Get all location sources for the Admin Console",
        "operationId": "getAllLocationSources",
        "responses": {
          "200": {
            "description": "Location sources retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LocationSourceResponse"
                  }
                }
              }
            }
          },
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,161 questions
{count} votes

Your answer

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