We are converting our Swagger to TypeSpec, and we have 2 LRO APIs, ImportDevices and ImportUpdate. The newly generated code changes the return type from Operation to Operation<BinaryData> so compilation breaks as it detects breaking change.
In generated client, I only see this which returns generic Operation:
public virtual Operation ImportDevices(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
dotnet pack would return error:
C:\Users\leolie\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20467.1\build\Microsoft.DotNet.ApiCompat.targets(82,5): error : MembersMustExist : Member 'public Azure.Operation Azure.IoT.DeviceUpdate.DeviceManagementClient.ImportDevices(Azure.WaitUntil, Azure.Core.RequestContent, Azure.RequestContext)' does
not exist in the implementation but it does exist in the contract. [D:\repos\azure-sdk-for-net\sdk\deviceupdate\Azure.IoT.DeviceUpdate\src\Azure.IoT.DeviceUpdate.csproj::TargetFramework=netstandard2.0]
There is no way for me to workaround this as I cannot just hand-implement the old method since the method name and signature are identical except the return type.
We are converting our Swagger to TypeSpec, and we have 2 LRO APIs, ImportDevices and ImportUpdate. The newly generated code changes the return type from
OperationtoOperation<BinaryData>so compilation breaks as it detects breaking change.In generated client, I only see this which returns generic Operation:
dotnet pack would return error:
There is no way for me to workaround this as I cannot just hand-implement the old method since the method name and signature are identical except the return type.