Skip to content

SQL breaking changes to fix Swagger spec validation errors/warnings#2927

Merged
cormacpayne merged 5 commits intoAzure:AutoRestfrom
jaredmoo:breakingchanges
Mar 23, 2017
Merged

SQL breaking changes to fix Swagger spec validation errors/warnings#2927
cormacpayne merged 5 commits intoAzure:AutoRestfrom
jaredmoo:breakingchanges

Conversation

@jaredmoo
Copy link
Contributor

@jaredmoo jaredmoo commented Mar 11, 2017

AutoRest enabled several new validation rules which exposed some naming issues in SQL swagger specs. I also noticed that several classes are no longer supported.

  • Removed unsupported types (e.g. Schema, Table, Column)
  • Revised import export operation and class names
  • Removed unnecessary import export operation results APIs

Corresponding Swagger change: Azure/azure-rest-api-specs#1005


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

SDK Generation Guidelines

  • If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
  • The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as a link to the swagger spec, used to generate the code.
  • The project.json and AssemblyInfo.cs files have been updated with the new version of the SDK.

@msftclas
Copy link

@jaredmoo,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@cormacpayne
Copy link
Member

This PR should be merged at the same time as #2914 and #2925

@jaredmoo
Copy link
Contributor Author

#2914 and #2925 are now combined into this

@jaredmoo
Copy link
Contributor Author

Swagger changes are all merged now.

@jaredmoo
Copy link
Contributor Author

btw project.json isn't updated because 1.2.0-preview hasn't been published yet.

@cormacpayne
Copy link
Member

@jaredmoo Hey Jared, two quick questions:

  1. Just to be sure, does this spec include all of the changes you originally wanted to make in this PR and the two that you closed?

  2. There are a lot of unnecessary commits, would you mind rebasing to get the number of commits down to 1 or 2?

Also renamed several types and operations for improved clarify and
consistency.

Additions:

- BlobAuditingPolicy APIs (e.g. Databases.CreateOrUpdateBlobAuditingPolicy)
- ThreatDetectionPolicy APIs (e.g. Databases.CreateOrUpdateThreatDetectionPolicy)
- Databases.ListByServer now supports $expand parameter
- Capabilities APIs (e.g. Capabilities.ListByLocation)

Types renamed:

- ServerFirewallRule -> FirewallRule
- DatabaseEditions -> DatabaseEdition
- ElasticPoolEditions -> ElasticPoolEdition
- ImportRequestParameters -> ImportRequest
- ExportRequestParameters -> ExportRequest
- ImportExportOperationResponse -> ImportExportResponse
- OperationMode -> ImportOperationMode
- TransparentDataEncryptionStates -> TransparentDataEncryptionStatus

Types removed:

- Unused types: UpgradeHint, Schema, Table, Column

Operations renamed:

- Servers.GetByResourceGroup -> Servers.Get
- Servers.CreateOrUpdateFirewallRule -> FirewallRule.CreateOrUpdate, and
similar for Get, List, and Delete
- Databases.Import -> Databases.CreateImportOperation
- Servers.Import -> Databases.Import
- Databases.PauseDataWarehouse -> Databases.Pause
- Databases.ResumeDataWarehouse -> Databases.Resume

Operations removed:

- Removed ImportExport operation results APIs since these are handled
  automatically by Azure async pattern.
@jaredmoo
Copy link
Contributor Author

Yes, since all swagger changes are now merged, all generated files in this change are based on rest-api-specs master branch.

I have squashed into a single commit and described all the breaking changes.

@jaredmoo
Copy link
Contributor Author

@cormacpayne can I get a review?

Copy link
Member

@cormacpayne cormacpayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaredmoo some comments that need to be resolved

Also, what is the UpgradeLog.htm file? I was unable to view it on GitHub or CodeFlow

global.json Outdated
"src/ResourceManagement/Monitor/Microsoft.Azure.Monitor"
]
],
"sdk": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaredmoo why was this added?

Copy link
Contributor Author

@jaredmoo jaredmoo Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this the build is totally broken on my machine, because I have VS2017 installed. See #2922 .

"Microsoft.Rest.ClientRuntime.Log4Net", "Microsoft.Rest.ClientRuntime.Tracing.Tests" ]
"Microsoft.Rest.ClientRuntime.Log4Net", "Microsoft.Rest.ClientRuntime.Tracing.Tests" ],
"sdk": {
"version": "1.0.0-preview2-003121"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaredmoo same comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"projects": [ "../../TestFramework", "Microsoft.Azure.Management.Sql", "Sql.Tests" ]
"projects": [ "../../TestFramework", "Microsoft.Azure.Management.Sql", "Sql.Tests" ],
"sdk": {
"version": "1.0.0-preview2-003121"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaredmoo same comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"projects": [ "Microsoft.Rest.ClientRuntime.Azure.TestFramework", "Microsoft.Azure.Test.HttpRecorder" ]
"projects": [ "Microsoft.Rest.ClientRuntime.Azure.TestFramework", "Microsoft.Azure.Test.HttpRecorder" ],
"sdk": {
"version": "1.0.0-preview2-003121"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaredmoo same comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

});
}

// List Server import/export operations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaredmoo is this removed block being tested somewhere else? Making sure there isn't any test regression with this being removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API is removed so no test is needed.

@@ -0,0 +1,183 @@
using Microsoft.Azure.Management.Resources;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaredmoo this file is missing the license header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8350101

@@ -0,0 +1,166 @@
using Microsoft.Azure.Management.Resources;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaredmoo this file is missing license header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8350101

@jaredmoo
Copy link
Contributor Author

UpgradeLog.htm is visual studio junk. Delete it.

@jaredmoo
Copy link
Contributor Author

@cormacpayne - I have addressed feedback. Not changing project.json since then it doesn't build for me. I think project.json goes away when #2815 is done.

@cormacpayne
Copy link
Member

@jaredmoo it looks like there is a merge conflict from a pull request that was merged earlier today

@jaredmoo
Copy link
Contributor Author

Ok, I reverted my change to this file in order to resolve the conflict.

@jaredmoo
Copy link
Contributor Author

@cormacpayne ready to merge again :)

@cormacpayne cormacpayne merged commit 027356f into Azure:AutoRest Mar 23, 2017
@jaredmoo jaredmoo deleted the breakingchanges branch June 7, 2017 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants