Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Autorest C# - eventhub #13585

Merged
merged 8 commits into from
Aug 13, 2020

Conversation

pakrym
Copy link
Contributor

@pakrym pakrym commented Jul 20, 2020

Contributes to #13511

Major features

  1. Collections are now always initialized and collection properties are readonly by default
  2. Internal deserialization ctors are removed for input-only models
  3. Improved nullability support - fewer extra null checks, correct nullable types generated. Might require adding missing annotations to the swagger spec.
  4. Improved header support - descriptions and x-ms-client-name honored.
  5. Single value, modelAsString enums are generated as types, they were string constants before.
  6. Readonly properties are not serialized - affects recordings.

What you might need to do:

  1. If you copied and overrode the serialization code you might want to update it to be in sync with new generator patterns.
  2. Please follow up on updating the centralized swagger file if there were workarounds applied to autorest.md

@@ -28,7 +28,7 @@ public async Task ConsumerGroupsCreateGetUpdateDelete()
{
Tier = SkuTier.Standard,
},
Tags = new Dictionary<string, string>()
Copy link
Member

Choose a reason for hiding this comment

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

@pakrym , when running this code, NullReferenceException is throw after removing new Dictionary<string, string>() here. It seems that Tags is not initialized with new Dictionary<> in TrackedResource.cs, could you take a look?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you sure the exception happens on this line?

Tags collection is initialized in ctor https://github.com/Azure/azure-sdk-for-net/pull/13585/files#diff-ee5ab4c1618b272e8775ca1a33b97a56R19

Copy link
Member

@allenjzhang allenjzhang left a comment

Choose a reason for hiding this comment

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

:shipit:

@pakrym pakrym merged commit 2a7f1f2 into Azure:master Aug 13, 2020
@pakrym pakrym deleted the pakrym/update-generator-eventhub branch August 13, 2020 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants