Update SDK based on examples changes to swagger spec#2847
Update SDK based on examples changes to swagger spec#2847shahabhijeet merged 24 commits intoAzure:AutoRestfrom
Conversation
…lastic pool crud, operation status, usages, and firewall rules
…instead of using hardcoded values in tests, other minor non-functional changes
|
Hi @nathannfan, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
TTYL, AZPRBOT; |
| string testName = this.GetType().FullName; | ||
| SqlManagementTestUtilities.RunTestInNewV12Server(testName, "TestDatabasePointInTimeRestore", testPrefix, (resClient, sqlClient, resourceGroup, server) => | ||
| { | ||
| Dictionary<string, string> tags = new Dictionary<string, string>() |
| activity = sqlClient.ElasticPools.ListDatabaseActivity(resourceGroup.Name, server.Name, epName2); | ||
| Assert.Equal(2, activity.Where(a => a.DatabaseName == dbName).Count()); | ||
| Assert.Equal(1, activity.Where(a => a.DatabaseName == dbName && a.Operation == "CREATE").Count()); | ||
| Assert.Equal(1, activity.Where(a => a.DatabaseName == dbName && a.Operation == "UPDATE").Count()); |
There was a problem hiding this comment.
Can you also test removing the database from the pool?
jaredmoo
left a comment
There was a problem hiding this comment.
Looks great, I would just like to see a test to remove db from pool.
|
Approved |
shahabhijeet
left a comment
There was a problem hiding this comment.
What version of AutoRest used to generate code.
Was the latest version used.
Also I don't see name simplification was used during code generation.
| throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); | ||
| } | ||
| } | ||
| // Deserialize Response |
There was a problem hiding this comment.
@nathannfan did the swagger changed and is no longer returning 202?
There was a problem hiding this comment.
Swagger still documents 202, but no longer has a response body, which I believe is why this section is removed.
| /// A response object containing the response body and response headers. | ||
| /// </return> | ||
| public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<System.Collections.Generic.IEnumerable<ElasticPoolDatabaseActivity>>> ListDatabaseActivityWithHttpMessagesAsync(string elasticPoolName, string resourceGroupName, string serverName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
| public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<System.Collections.Generic.IEnumerable<ElasticPoolDatabaseActivity>>> ListDatabaseActivityWithHttpMessagesAsync(string resourceGroupName, string serverName, string elasticPoolName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
There was a problem hiding this comment.
@nathannfan was name simplification used when the code was generated via AutoRest?
There was a problem hiding this comment.
@shahabhijeet Not sure how that is specified. Is there documentation?
There was a problem hiding this comment.
Synced up with Cormac. This requires a later version of AutoRest.
|
@azuresdkci test this please |
|
@nathannfan starting next PR, please use the latest Autorest 1.0 to regen code. It's ok for this PR. |
Description
Swagger spec pull request: Azure/azure-rest-api-specs#954
This change updated the auto-generated SDK based on changes to the swagger spec that were done in response to examples validation and Fiddler testing.
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
Testing Guidelines
SDK Generation Guidelines
project.jsonandAssemblyInfo.csfiles have been updated with the new version of the SDK.