-
Notifications
You must be signed in to change notification settings - Fork 5k
[EdgeOrder] SDK validation for TypeSpec #51790
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
base: main
Are you sure you want to change the base?
Conversation
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderItemCollection.cs
Outdated
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderAddressCollection.cs
Outdated
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemCollection.cs
Outdated
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressCollection.cs
Outdated
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.cs
Show resolved
Hide resolved
...eManager.EdgeOrder/src/Generated/Models/UnknownEdgeOrderProductMeterDetails.Serialization.cs
Outdated
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Azure EdgeOrder Resource Manager SDK to validate it against TypeSpec definitions, upgrading the API version from 2021-12-01 to 2024-02-01. The changes primarily consist of custom model classes and extensions to maintain backward compatibility while adapting to the new TypeSpec-generated code structure.
- Adds custom model classes with serialization attributes to handle property mapping
- Implements backward compatibility methods marked with EditorBrowsable(Never)
- Updates assets.json tag reference for new test assets
Reviewed Changes
Copilot reviewed 23 out of 159 changed files in this pull request and generated 25 comments.
Show a summary per file
File | Description |
---|---|
Custom/Models/*.cs | Custom model classes with CodeGenSerialization attributes for property mapping |
Custom/Extensions/*.cs | Extension methods providing backward compatibility overloads |
Custom/EdgeOrder*.cs | Custom constructors and collections maintaining API compatibility |
assets.json | Updates test assets tag reference |
CHANGELOG.md | Documents API version upgrade to 2024-02-01 |
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductLine.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductLine.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductLine.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductLine.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductLine.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderProduct.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderProduct.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderProduct.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderProduct.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderProduct.cs
Show resolved
Hide resolved
@@ -232,44 +279,214 @@ protected MockableEdgeOrderSubscriptionResource() { } | |||
} | |||
namespace Azure.ResourceManager.EdgeOrder.Models | |||
{ | |||
public partial class AdditionalConfiguration : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.EdgeOrder.Models.AdditionalConfiguration>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.AdditionalConfiguration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to ProductDetailsAdditionalConfiguration
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.AdditionalConfiguration>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } | ||
} | ||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
public readonly partial struct AddressClassification : System.IEquatable<Azure.ResourceManager.EdgeOrder.Models.AddressClassification> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to EdgeOrderAddressClassification
public static Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails TermTypeDetails(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType termType = default(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType), System.TimeSpan termTypeDuration = default(System.TimeSpan)) { throw null; } | ||
} | ||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
public readonly partial struct AutoProvisioningStatus : System.IEquatable<Azure.ResourceManager.EdgeOrder.Models.AutoProvisioningStatus> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to EdgeOrderAutoProvisioningStatus
public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.AutoProvisioningStatus left, Azure.ResourceManager.EdgeOrder.Models.AutoProvisioningStatus right) { throw null; } | ||
public override string ToString() { throw null; } | ||
} | ||
public partial class CategoryInformation : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.EdgeOrder.Models.CategoryInformation>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.CategoryInformation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to ChildConfigurationCategoryInformation
string System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.CategoryInformation>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } | ||
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.CategoryInformation>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } | ||
} | ||
public partial class ChildConfiguration : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.EdgeOrder.Models.ChildConfiguration>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.ChildConfiguration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to ProductChildConfiguration
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.net8.0.cs
Show resolved
Hide resolved
sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.net8.0.cs
Show resolved
Hide resolved
public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType left, Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType right) { throw null; } | ||
public override string ToString() { throw null; } | ||
} | ||
public partial class ConfigurationDeviceDetails : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.EdgeOrder.Models.ConfigurationDeviceDetails>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.ConfigurationDeviceDetails> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to ProductConfigurationDeviceDetails
@@ -755,9 +1036,40 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer | |||
string System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } | |||
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } | |||
} | |||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | |||
public readonly partial struct FulfillmentType : System.IEquatable<Azure.ResourceManager.EdgeOrder.Models.FulfillmentType> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to ConfigurationFulfillmentType
@@ -769,6 +1081,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer | |||
string System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } | |||
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } | |||
} | |||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | |||
public readonly partial struct IdentificationType : System.IEquatable<Azure.ResourceManager.EdgeOrder.Models.IdentificationType> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to ConfigurationIdentificationType
@@ -869,6 +1201,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer | |||
public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.OrderItemType left, Azure.ResourceManager.EdgeOrder.Models.OrderItemType right) { throw null; } | |||
public override string ToString() { throw null; } | |||
} | |||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | |||
public readonly partial struct OrderMode : System.IEquatable<Azure.ResourceManager.EdgeOrder.Models.OrderMode> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to EdgeOrderItemMode
@@ -1185,6 +1549,64 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer | |||
public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ProductWeightMeasurementUnit left, Azure.ResourceManager.EdgeOrder.Models.ProductWeightMeasurementUnit right) { throw null; } | |||
public override string ToString() { throw null; } | |||
} | |||
public partial class ProvisioningDetails : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.EdgeOrder.Models.ProvisioningDetails>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.ProvisioningDetails> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to EdgeOrderProvisioningDetails
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EdgeOrder.Models.ProvisioningDetails>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } | ||
} | ||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
public readonly partial struct ProvisioningState : System.IEquatable<Azure.ResourceManager.EdgeOrder.Models.ProvisioningState> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to EdgeOrderProvisioningState
public override string ToString() { throw null; } | ||
} | ||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
public readonly partial struct ProvisioningSupport : System.IEquatable<Azure.ResourceManager.EdgeOrder.Models.ProvisioningSupport> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let us polish the name of this type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to EdgeOrderProvisioningSupport
This is the SDK validation for EdgeOrder.
TSP link: Azure/azure-rest-api-specs#36873
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.