From e77b1791ef73f07c5818ab21f695db4768a38cd2 Mon Sep 17 00:00:00 2001 From: Srikanta Date: Mon, 1 Feb 2021 00:39:11 -0800 Subject: [PATCH] Include AzureSasCredential as allowed type for credential builder method --- .../azure/tools/apiview/processor/diagnostics/Diagnostics.java | 3 ++- .../rules/RequiredBuilderMethodsDiagnosticRule.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/apiview-java-processor/src/main/java/com/azure/tools/apiview/processor/diagnostics/Diagnostics.java b/src/java/apiview-java-processor/src/main/java/com/azure/tools/apiview/processor/diagnostics/Diagnostics.java index 6f58390fa7e..c9af000d463 100644 --- a/src/java/apiview-java-processor/src/main/java/com/azure/tools/apiview/processor/diagnostics/Diagnostics.java +++ b/src/java/apiview-java-processor/src/main/java/com/azure/tools/apiview/processor/diagnostics/Diagnostics.java @@ -51,7 +51,8 @@ public Diagnostics() { .add("configuration", new ExactTypeNameCheckFunction("Configuration")) .add("clientOptions", new ExactTypeNameCheckFunction("ClientOptions")) .add("connectionString", new ExactTypeNameCheckFunction("String")) - .add("credential", new ExactTypeNameCheckFunction(new ParameterAllowedTypes("TokenCredential", "AzureKeyCredential"))) + .add("credential", new ExactTypeNameCheckFunction(new ParameterAllowedTypes("TokenCredential", + "AzureKeyCredential", "AzureSasCredential"))) .add("endpoint", new ExactTypeNameCheckFunction("String")) .add("serviceVersion", new DirectSubclassCheckFunction("ServiceVersion"))); diagnostics.add(new RequiredBuilderMethodsDiagnosticRule("amqp") diff --git a/src/java/apiview-java-processor/src/main/java/com/azure/tools/apiview/processor/diagnostics/rules/RequiredBuilderMethodsDiagnosticRule.java b/src/java/apiview-java-processor/src/main/java/com/azure/tools/apiview/processor/diagnostics/rules/RequiredBuilderMethodsDiagnosticRule.java index b27f358752a..286192e55de 100644 --- a/src/java/apiview-java-processor/src/main/java/com/azure/tools/apiview/processor/diagnostics/rules/RequiredBuilderMethodsDiagnosticRule.java +++ b/src/java/apiview-java-processor/src/main/java/com/azure/tools/apiview/processor/diagnostics/rules/RequiredBuilderMethodsDiagnosticRule.java @@ -98,7 +98,7 @@ public static class ExactTypeNameCheckFunction implements Function