0
votes

I would like to update operation of an API with swagger link using ARM Template. When I run the below ARM Template I get the error

"error": { "code": "InvalidRequestContent", "message": "The request content was invalid and could not be deserialized: 'Could not find member 'dependsOn' on object of type 'DeploymentPropertiesDefinition'. Path 'properties.dependsOn', line 1, position 734.'."

https://docs.microsoft.com/en-us/azure/templates/microsoft.apimanagement/2018-06-01-preview/service/apis

{
    "$schema":
        "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
  "parameters": {
    "ApimServiceName": {
      "type": "string"
    },
    "swaggerjson": {"type": "string"}
  },
  "variables": {    
  },
    "resources": [
      {
        "type": "Microsoft.ApiManagement/service/apis",
        "name": "[concat(parameters('ApimServiceName'), '/animalAPI4')]",
        "apiVersion": "2018-02-01-preview",
        "scale": null,
        "properties": {
          "displayName": "HTTP animal API",
          "apiRevision": "1",
          "description": "API Management facade for a very handy and free online HTTP toolsds",
          "serviceUrl": "https://animailhttpbin.org",
          "path": "animals4",
          "contentFormat": "swagger-link-json",
          "contentValue": "[parameters('swaggerjson')]",
          "apiVersionSet": {
            "id": "[concat(resourceId('Microsoft.ApiManagement/service', parameters('ApimServiceName')), '/api-version-sets/versionset-animal-api4')]"
          },
          "protocols": [
            "https"
          ],
          "authenticationSettings": null,
          "subscriptionKeyParameterNames": null,
          "apiVersion": "v1"
        },
        "dependsOn": [
        ]
      }

    ]
}
1
why dont you just remove dependsOn property? also, according to the error, you have dependsOn under properties somewhere4c74356b41
I had added dependsOn to see if it made any difference but the same error occurred. I have added the ref link for Microsoft.ApiManagement/service/apis. In that there is no dependsOn in sided the properties.kumar

1 Answers

0
votes

Figured it out the issue was with the linked template from where I was calling the bracket around properties also include dependsOn. fixed the bracket issue