EventGrid Dataplane SDK: Re-generated SDK to include new event types + updated corresponding unit tests#4691
Conversation
| [JsonConverter(typeof(JobStateConverter))] | ||
| public struct JobState : System.IEquatable<JobState> | ||
| [JsonConverter(typeof(StringEnumConverter))] | ||
| public enum JobState |
There was a problem hiding this comment.
Question to the reviewer:
This model is based on the swagger definition in https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventgrid/data-plane/Microsoft.Media/stable/2018-01-01/MediaServices.json. There have been no changes in this swagger since May 18, hence I am looking to understand why this got re-generated (new autorest behavior?). Can you please help me understand this?
There was a problem hiding this comment.
@kalyanaj The behavior per se would be the same for both ends, i.e., the REST service sending/receiving this enum value vs the client.
Its a better/cleaner implementation of extensible enum that we released over the past few months. We do have some flags available to revert to the legacy implementation.
dsgouda
left a comment
There was a problem hiding this comment.
Looks good for the most part
| /// Hub. | ||
| /// </summary> | ||
| [JsonProperty(PropertyName = "opType")] | ||
| public string OpType { get; set; } |
There was a problem hiding this comment.
Removing properties is a breaking change, please bump the major version number for nuget package
There was a problem hiding this comment.
OK, updating the version number in the csproj to 2.0.0. Also, updating the AssemblyFileVersion to 2.0.0.0 and AssemblyVersion to 2.0.0.0. Please let me know in case that's not what you meant...
There was a problem hiding this comment.
Thanks, I have updated this in the latest commit.
| [JsonConverter(typeof(JobStateConverter))] | ||
| public struct JobState : System.IEquatable<JobState> | ||
| [JsonConverter(typeof(StringEnumConverter))] | ||
| public enum JobState |
There was a problem hiding this comment.
@kalyanaj The behavior per se would be the same for both ends, i.e., the REST service sending/receiving this enum value vs the client.
Its a better/cleaner implementation of extensible enum that we released over the past few months. We do have some flags available to revert to the legacy implementation.
|
Thanks @dsgouda for the review. If you have any additional comments, please let me know. If it looks good, can you please merge this? We are looking to release this tomorrow. |
Description
EventGrid Dataplane SDK: Re-generated SDK to include new event types + updated corresponding unit tests. Swagger updates that trigger this are:
Azure/azure-rest-api-specs#3504
Azure/azure-rest-api-specs#3448
Azure/azure-rest-api-specs#3174
This checklist is used to make sure that common guidelines for a pull request are followed.
Note: For the two IoT events (DeviceCreated/DeviceDeleted), the IoT team has removed two properties from the data schema. IoT events for EventGrid is currently in preview, hence this change has been done before they GA their EventGrid support.
General Guidelines
Testing Guidelines
SDK Generation Guidelines
*.csprojandAssemblyInfo.csfiles have been updated with the new version of the SDK.