Skip to content

Commit

Permalink
Include AzureSasCredential as allowed type for credential builder met…
Browse files Browse the repository at this point in the history
…hod (#1360)
  • Loading branch information
srnagar authored Feb 1, 2021
1 parent cc8a11f commit 8505e8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static class ExactTypeNameCheckFunction implements Function<MethodDeclara
private final ParameterAllowedTypes[] expectedTypes;

// For each parameter that we check for, we allow for there to be multiple types allowed for it,
// e.g. credential(TokenCredential) or credential(AzureKeyCredential)
// e.g. credential(TokenCredential) or credential(AzureKeyCredential) or credential(AzureSasCredential)
public ExactTypeNameCheckFunction(ParameterAllowedTypes... expectedTypes) {
this.expectedTypes = expectedTypes;
}
Expand Down

0 comments on commit 8505e8f

Please sign in to comment.