[Network] Verify swagger common no common - #29931
Draft
Pan-Qi wants to merge 1 commit into
Draft
Conversation
Contributor
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Network management SDK generation inputs/config so the generated C# models align with the latest Network swagger shapes (notably around “Common.*” naming and systemData typing), reducing drift between swagger and generated output.
Changes:
- Bumped the azure-rest-api-specs commit used by
src/Network/Network.Management.SdkAutoRest config and commented out legacy “Common.*” name-rewrite directives. - Switched multiple NSP-related model constructors/properties from
SecurityPerimeterSystemDatato the sharedSystemDatatype. - Removed the now-redundant generated
SecurityPerimeterSystemDatamodel file.
Reviewed changes
Copilot reviewed 1 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Network/Network.Management.Sdk/README.md | Updates generation commit and adjusts/disabled legacy directives related to “Common.*” naming and definition transforms. |
| src/Network/Network.Management.Sdk/Generated/Models/ServiceGateway.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/SecurityPerimeterTrackedResource.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/SecurityPerimeterSystemData.cs | Removes redundant model (replaced by existing SystemData). |
| src/Network/Network.Management.Sdk/Generated/Models/SecurityPerimeterResource.cs | Changes SystemData property/ctor param type to SystemData. |
| src/Network/Network.Management.Sdk/Generated/Models/SecurityPerimeterProxyResource.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/NspProfile.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/NspLoggingConfiguration.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/NspLinkReference.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/NspLink.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/NspAssociation.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/NspAccessRule.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
| src/Network/Network.Management.Sdk/Generated/Models/NetworkSecurityPerimeter.cs | Uses SystemData instead of SecurityPerimeterSystemData in constructor signature. |
Comments suppressed due to low confidence (2)
src/Network/Network.Management.Sdk/README.md:116
- The comment still refers to "Common.SubResourceModel"/"Common.SubResource", but the directives now target "SubResourceModel" and "SubResource". Update the comment to match the actual definition names being transformed.
# move x-ms-azure-resource from Common.SubResourceModel to Common.SubResource
src/Network/Network.Management.Sdk/README.md:101
- This comment block says "rename Common.CloudError to CloudError", but the associated directive is commented out. Clarify that the transform is a legacy workaround that is currently disabled (or re-enable it if still needed).
# rename Common.CloudError to CloudError, see https://github.com/Azure/azure-rest-api-specs/blob/906c9971ea117692ad6e7e15fe1a0b38ac109c76/specification/network/resource-manager/Microsoft.Network/Network/stable/2025-07-01/common.json#L2026
# Srijani, I noticed in the swaggers generated from tsp, some model names are added the prefix "common.", the change will lead to the change of the generated C# class name. As a result, it may cause some issues and breaking changes. Following is a case. I would suggest you remove the prefix "common.".
Comment on lines
85
to
89
| # Strip the "Common." prefix from all definitions so the generated C# class names | ||
| # stay backward-compatible with the handwritten Az.Network layer. Without this directive | ||
| # every "Common.X" swagger definition becomes a "CommonX" C# class (e.g. CommonRouteTable, | ||
| # CommonSubResource, CommonLoadBalancer), breaking the handwritten cmdlets that reference | ||
| # the legacy names. |
Contributor
Author
|
/azp run |
Contributor
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.