Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

Mitigate breaking change of optional parameter change for ModelFactory#4026

Merged
live1206 merged 43 commits into
Azure:feature/v3from
live1206:overload-breakingchange
Jan 17, 2024
Merged

Mitigate breaking change of optional parameter change for ModelFactory#4026
live1206 merged 43 commits into
Azure:feature/v3from
live1206:overload-breakingchange

Conversation

@live1206

@live1206 live1206 commented Dec 8, 2023

Copy link
Copy Markdown
Member

Fixes #3596.

This PR introduces SignatureType, it holds three portions of code:

  • current
  • custom
  • baseline contract
    current union custom compare with previous contract outputs the changeset, with it we can apply different rules with

It provides

  • OverloadingMethods: for now represents the missing methods in baseline contract due to additional optional parameters in the new contract, this is causing breaking changes
  • MethodsToSkip: represents the methods already defined in custom code, the writer should skip them while writing to the output

This feature is only enabled for Mgmt.

  • For DPG, there is no GA version yet, ApiCompatVersion is not set in .csproj
  • For HLC, there are quite some hand-written/custom code, which is not supported by TypeFactory.TryCreateType since CsharpType does not represent them properly for now.

@live1206 live1206 added the Mgmt This issue is related to a management-plane library. label Dec 8, 2023
Comment thread src/AutoRest.CSharp/Common/AutoRest/Plugins/CSharpGen.cs Outdated
Comment thread src/AutoRest.CSharp/Common/AutoRest/Plugins/CSharpGen.cs Outdated
Comment thread src/AutoRest.CSharp/Common/AutoRest/Plugins/GeneratedCodeWorkspace.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/MethodSignature.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/OverloadMethodSignature.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/ModelFactoryTypeProvider.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Types/CSharpType.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Writers/CodeWriterExtensions.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Writers/ModelFactoryWriter.cs Outdated
Comment thread src/AutoRest.CSharp/Common/AutoRest/Plugins/GeneratedCodeWorkspace.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureType.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Writers/CodeWriterExtensions.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/ModelFactoryTypeProvider.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureType.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureType.cs
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureType.cs
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureType.cs
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureType.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Shared/CSharpAttribute.cs
@live1206

Copy link
Copy Markdown
Member Author

Pending on Azure/azure-sdk-for-net#41322

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Overload function to allow method signature change for Model Factory - parameter

4 participants