Skip to content

Commit

Permalink
removed id validation (Azure#7010)
Browse files Browse the repository at this point in the history
  • Loading branch information
solankisamir authored and erich-wang committed Jul 24, 2019
1 parent 81fd337 commit 39b91f4
Show file tree
Hide file tree
Showing 31 changed files with 197 additions and 445 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Microsoft.Azure.Management.ApiManagment release notes

### Changes in 4.11.0-preview

- Removed id validation on `groups`, `apis`, `products`, `users` and `backend` to unblock existing customers to onboard to new sdks

### Changes in 4.10.0-preview

- Fixed support for creating, updating Swagger, WSDL and Open Api Schema.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ internal ApiDiagnosticOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (Client.ApiVersion == null)
{
Expand Down Expand Up @@ -369,10 +365,6 @@ internal ApiDiagnosticOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (diagnosticId == null)
{
Expand Down Expand Up @@ -620,10 +612,6 @@ internal ApiDiagnosticOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (diagnosticId == null)
{
Expand Down Expand Up @@ -896,10 +884,6 @@ internal ApiDiagnosticOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (diagnosticId == null)
{
Expand Down Expand Up @@ -1213,10 +1197,6 @@ internal ApiDiagnosticOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (diagnosticId == null)
{
Expand Down Expand Up @@ -1477,10 +1457,6 @@ internal ApiDiagnosticOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (diagnosticId == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ internal ApiIssueAttachmentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -397,10 +393,6 @@ internal ApiIssueAttachmentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -673,10 +665,6 @@ internal ApiIssueAttachmentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -974,10 +962,6 @@ internal ApiIssueAttachmentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -1311,10 +1295,6 @@ internal ApiIssueAttachmentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ internal ApiIssueCommentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -397,10 +393,6 @@ internal ApiIssueCommentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -673,10 +665,6 @@ internal ApiIssueCommentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -973,10 +961,6 @@ internal ApiIssueCommentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -1310,10 +1294,6 @@ internal ApiIssueCommentOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ internal ApiIssueOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (Client.ApiVersion == null)
{
Expand Down Expand Up @@ -377,10 +373,6 @@ internal ApiIssueOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -631,10 +623,6 @@ internal ApiIssueOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -912,10 +900,6 @@ internal ApiIssueOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -1228,10 +1212,6 @@ internal ApiIssueOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down Expand Up @@ -1492,10 +1472,6 @@ internal ApiIssueOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (issueId == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,6 @@ internal ApiOperationOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (Client.ApiVersion == null)
{
Expand Down Expand Up @@ -650,10 +646,6 @@ internal ApiOperationOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (Client.ApiVersion == null)
{
Expand Down Expand Up @@ -927,10 +919,6 @@ internal ApiOperationOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (parameters == null)
{
Expand Down Expand Up @@ -1245,10 +1233,6 @@ internal ApiOperationOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (parameters == null)
{
Expand Down Expand Up @@ -1510,10 +1494,6 @@ internal ApiOperationOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (ifMatch == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ internal ApiOperationPolicyOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (Client.ApiVersion == null)
{
Expand Down Expand Up @@ -402,10 +398,6 @@ internal ApiOperationPolicyOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (Client.ApiVersion == null)
{
Expand Down Expand Up @@ -660,10 +652,6 @@ internal ApiOperationPolicyOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (Client.ApiVersion == null)
{
Expand Down Expand Up @@ -945,10 +933,6 @@ internal ApiOperationPolicyOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (parameters == null)
{
Expand Down Expand Up @@ -1262,10 +1246,6 @@ internal ApiOperationPolicyOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "operationId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(operationId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "operationId", "^[^*#&+:<>?]+$");
}
}
if (ifMatch == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ internal ApiProductOperations(ApiManagementClient client)
{
throw new ValidationException(ValidationRules.MinLength, "apiId", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(apiId, "^[^*#&+:<>?]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "apiId", "^[^*#&+:<>?]+$");
}
}
if (Client.ApiVersion == null)
{
Expand Down
Loading

0 comments on commit 39b91f4

Please sign in to comment.