diff --git a/azure-client-runtime/src/main/java/com/microsoft/azure/ExpressionEvaluationDetails.java b/azure-client-runtime/src/main/java/com/microsoft/azure/ExpressionEvaluationDetails.java index d3667780e..00e510037 100644 --- a/azure-client-runtime/src/main/java/com/microsoft/azure/ExpressionEvaluationDetails.java +++ b/azure-client-runtime/src/main/java/com/microsoft/azure/ExpressionEvaluationDetails.java @@ -8,6 +8,8 @@ import java.util.List; +import com.fasterxml.jackson.annotation.JsonFormat; + public class ExpressionEvaluationDetails { private String expression; @@ -20,6 +22,7 @@ public class ExpressionEvaluationDetails { private String result; + @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) private List targetValue; public String getExpression() { diff --git a/azure-client-runtime/src/test/java/com/microsoft/azure/CloudErrorDeserializerTests.java b/azure-client-runtime/src/test/java/com/microsoft/azure/CloudErrorDeserializerTests.java index 22387d5c8..462e54d30 100644 --- a/azure-client-runtime/src/test/java/com/microsoft/azure/CloudErrorDeserializerTests.java +++ b/azure-client-runtime/src/test/java/com/microsoft/azure/CloudErrorDeserializerTests.java @@ -261,43 +261,7 @@ public void testEvaluationDetails() throws IOException { + " \"expression\": \"type\",\n" + " \"path\": \"type\",\n" + " \"expressionValue\": \"Microsoft.ApiManagement/service\",\n" - + " \"targetValue\": [\n" - + " \"Microsoft.Resources/resourceGroups\",\n" - + " \"Microsoft.Storage/storageAccounts\",\n" - + " \"Microsoft.Web/sites\",\n" - + " \"Microsoft.Web/serverFarms\",\n" - + " \"Microsoft.Web/functions\",\n" - + " \"Microsoft.DocumentDB/databaseAccounts\",\n" - + " \"microsoft.insights/components\",\n" - + " \"Microsoft.KeyVault/vaults\",\n" - + " \"Microsoft.Cache/Redis\",\n" - + " \"Microsoft.ServiceBus/namespaces\",\n" - + " \"Microsoft.ServiceBus/namespaces/authorizationrules\",\n" - + " \"Microsoft.ServiceBus/namespaces/queues\",\n" - + " \"Microsoft.ServiceBus/namespaces/queues/authorizationrules\",\n" - + " \"Microsoft.ServiceBus/namespaces/topics\",\n" - + " \"Microsoft.ServiceBus/namespaces/topics/authorizationrules\",\n" - + " \"Microsoft.ServiceBus/namespaces/topics/subscriptions\",\n" - + " \"Microsoft.ServiceBus/namespaces/topics/subscriptions/rules\",\n" - + " \"Microsoft.CognitiveServices/accounts\",\n" - + " \"Microsoft.Web/sites/slots\",\n" - + " \"Microsoft.Web/sites/slots/instances\",\n" - + " \"Microsoft.Web/sites/slots/metrics\",\n" - + " \"Microsoft.Web/sites/metrics\",\n" - + " \"Microsoft.Web/sites/instances\",\n" - + " \"Microsoft.Web/certificates\",\n" - + " \"Microsoft.Portal/dashboards\",\n" - + " \"Microsoft.ContainerRegistry/registries\",\n" - + " \"Microsoft.ContainerRegistry/registries/webhooks\",\n" - + " \"Microsoft.Web/connections\",\n" - + " \"Microsoft.Logic/workflows\",\n" - + " \"Microsoft.Web/customApis\",\n" - + " \"Microsoft.Search/searchServices\",\n" - + " \"Microsoft.Network/trafficmanagerprofiles\",\n" - + " \"Microsoft.Sql/servers\",\n" - + " \"Microsoft.Sql/servers/databases\",\n" - + " \"Microsoft.SignalRService/SignalR\"\n" - + " ],\n" + + " \"targetValue\": \"Microsoft.Resources/resourceGroups\",\n" + " \"operator\": \"In\"\n" + " }\n" + " ]\n"