Azure devops 指定的炫耀版本未知。Azure APIM ARM模板

Azure devops 指定的炫耀版本未知。Azure APIM ARM模板,azure-devops,openapi,azure-api-management,arm-template,Azure Devops,Openapi,Azure Api Management,Arm Template,只有当我通过ARM模板部署时,当我尝试从门户成功部署时,我才面临这个问题。我认为问题可能与我使用的版本有关,因此我更改了模板中的最后3个版本(),仍然是同一个问题。有人能告诉我这里出了什么问题吗?我添加了最小复制 昂首阔步: { "openapi": "3.0.1", "info": { "title": "Test", "description": &

只有当我通过ARM模板部署时,当我尝试从门户成功部署时,我才面临这个问题。我认为问题可能与我使用的版本有关,因此我更改了模板中的最后3个版本(),仍然是同一个问题。有人能告诉我这里出了什么问题吗?我添加了最小复制

昂首阔步:

{
  "openapi": "3.0.1",
  "info": {
    "title": "Test",
    "description": "Test",
    "version": "1.0"
  },
  "paths": {
    "/api/v1/test": {
      "get": {
        "tags": [
          "Test"
        ],
        "summary": "Test",
        "parameters": [
          {
            "name": "TestName",
            "in": "query",
            "schema": {
              "minLength": 3,
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "500": {
            "description": "Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {

      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "nullable": true
          },
          "errorDescription": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }

    }
  }
}
手臂模板

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "ApimServiceName": {
      "type": "string"
    }
  },
  "resources": [
    {
      "properties": {
        "serviceUrl": "https://test.url",
        "path": "projects",
        "value": ***"swaggerstorageaccounturl.json",***
        "format": "swagger-link-json"
      },
      "name": "[concat(parameters('ApimServiceName'), '/Test')]",
      "type": "Microsoft.ApiManagement/service/apis",
      "apiVersion": "2020-06-01-preview",
      "dependsOn": []
    }
  ]
}

当我尝试使用这里提到的petstore示例时,无论是从模板还是从门户,它都是成功的。

我已经让它工作起来了。问题是,对于OpenAPI3.0.1,我们应该将格式指定为openapi链接,而不是swagger json链接。这里提到,,


我已经让它工作了。问题是,对于OpenAPI3.0.1,我们应该将格式指定为openapi链接,而不是swagger json链接。这里提到,,

 "properties": {
                "serviceUrl": "https;//test.url",
                "path": "test",
                "value": "https://storageaccurl.json",
                "format": "openapi-link"
            }