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

Mitigate breaking change for optional parameter change#3686

Merged
live1206 merged 57 commits into
Azure:feature/v3from
live1206:overload-mitigation
Dec 8, 2023
Merged

Mitigate breaking change for optional parameter change#3686
live1206 merged 57 commits into
Azure:feature/v3from
live1206:overload-mitigation

Conversation

@live1206

@live1206 live1206 commented Aug 24, 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

@live1206 live1206 added the Mgmt This issue is related to a management-plane library. label Aug 24, 2023
Comment thread src/AutoRest.CSharp/Common/Generation/Writers/CodeWriterExtensions.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/MethodSignature.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/MethodSignatureBase.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/ModelFactoryTypeProvider.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureTypeProvider.cs Outdated
@live1206

Copy link
Copy Markdown
Member Author

@m-nash Please take a look at this PR, it mitigates breaking changes for additional optional parameters in model factory.

Comment thread src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Writers/BreakingChangeWriter.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/MethodSignatureBase.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/ModelFactoryTypeProvider.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/MethodSignature.cs Outdated
Comment thread src/AutoRest.CSharp/Mgmt/Decorator/TypeExtensions.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/TypeProvider.cs Outdated
Comment thread src/AutoRest.CSharp/Mgmt/AutoRest/MgmtContext.cs
@live1206 live1206 requested a review from hallipr as a code owner December 4, 2023 03:17
Comment thread src/AutoRest.CSharp/Common/AutoRest/Plugins/CSharpGen.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/MethodSignature.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/MethodSignature.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/ModelFactoryTypeProvider.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureType.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/TypeProvider.cs Outdated
Comment thread src/AutoRest.CSharp/Common/Output/Models/Types/SignatureType.cs
Comment thread src/AutoRest.CSharp/Common/Output/Models/Shared/Parameter.cs
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 Outdated
Comment thread src/AutoRest.CSharp/Common/Generation/Types/CSharpType.cs
@live1206 live1206 merged commit 10de73e into Azure:feature/v3 Dec 8, 2023
@live1206 live1206 deleted the overload-mitigation branch December 8, 2023 03:04
live1206 added a commit to live1206/autorest.csharp that referenced this pull request Dec 8, 2023
live1206 added a commit that referenced this pull request Dec 8, 2023
live1206 added a commit to live1206/autorest.csharp that referenced this pull request Dec 8, 2023
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