Skip to content

[ACR] Update to 2017-03-01 version#2946

Merged
cormacpayne merged 3 commits into
Azure:AutoRestfrom
djyou:AutoRest
Mar 23, 2017
Merged

[ACR] Update to 2017-03-01 version#2946
cormacpayne merged 3 commits into
Azure:AutoRestfrom
djyou:AutoRest

Conversation

@djyou
Copy link
Copy Markdown
Member

@djyou djyou commented Mar 16, 2017

  1. Update getCredentials to listCredentials to support multiple login credentials.
  2. Refine regenerateCredential to support regenerate the specified login credential.
  3. Add Sku to registry properties as a required property.
  4. Rename GetProperties to Get.
  5. Change CreateOrUpdate to Create, add registry create parameters.

Generated from swagger https://github.com/Azure/azure-rest-api-specs/blob/master/arm-containerregistry/2017-03-01/swagger/containerregistry.json

Description


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.

1. Update getCredentials to listCredentials to support multiple login
credentials.
2. Refine regenerateCredential to support regenerate the specified login
credential.
3. Add Sku to registry properties as a required property.
4. Rename GetProperties to Get.
5. Change CreateOrUpdate to Create, add registry create parameters.
@djyou
Copy link
Copy Markdown
Member Author

djyou commented Mar 16, 2017

/cc @sajayantony

@sajayantony
Copy link
Copy Markdown

/cc @JasonRShaver can we get this merged. RPs have been already updated.

Copy link
Copy Markdown
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.

@djyou a couple of comments that need to be resolved (the comments that point out the breaking changes are just for identification - no action needed with those)

}

[Fact]
public void ContainerRegistryUpdateWithCreateTest()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@djyou why was this test removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We changed CreateOrUpdate to Create in this api-version.

set autoRestVersion=1.0.0-Nightly20170212
if "%1" == "" (
set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-containerregistry/2016-06-27-preview/swagger/containerregistry.json"
set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-containerregistry/2017-03-01/swagger/containerregistry.json"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@djyou can you change this URL to point at the commit (which I believe would be this URL) instead of the path in the rest-api-specs repo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed.

@@ -1,48 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@djyou removal of this file is a breaking change

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this is a new api-version with breaking change.

[Newtonsoft.Json.JsonProperty(PropertyName = "properties.storageAccount")]
public StorageAccountProperties StorageAccount { get; set; }
[JsonProperty(PropertyName = "properties.storageAccount")]
public StorageAccountParameters StorageAccount { get; set; }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@djyou changing the name of a property in a model class is a breaking change

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this is a new api-version with breaking change.

/// Gets or sets the access key to the storage account.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "accessKey")]
public string AccessKey { get; set; }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@djyou removing the property of a model class is a breaking change

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this is a new api-version with breaking change.

@@ -1,5 +1,5 @@
{
"version": "1.1.0-preview",
"version": "1.2.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@djyou since you are introducing breaking changes, this will need to remain in preview

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Our service is going GA as of this 2017-03-01 api-version, do we still keep the SDK as preview?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, we have a concept of preview vs stable SDKs: when a breaking change is introduced (or a large feature is added) to the SDK, the package must go into (or stay) preview for X amount of time, after which the package can be considered stable and the -preview suffix can be removed from the version. We are trying to give customers an idea of the stability of the packages they are using from this repository.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you for explaining. Fixed.

@cormacpayne
Copy link
Copy Markdown
Member

@azuresdkci test this please

@djyou
Copy link
Copy Markdown
Member Author

djyou commented Mar 23, 2017

@cormacpayne Are there more comments or can we get this merged so we can publish the package? Thanks.

@cormacpayne cormacpayne merged commit 441ddf6 into Azure:AutoRest Mar 23, 2017
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.

4 participants