twilio / twilio-csharp

Twilio C#/.NET Helper Library for .NET6+.
MIT License
677 stars 301 forks source link

Undocumented breaking change in 7.0.0->7.0.1 upgrade? #741

Closed KirkMunroSagent closed 7 months ago

KirkMunroSagent commented 7 months ago

Issue Summary

The following commit includes a breaking change in the PhoneNumberResource.Fetch method (change from Types.PhoneNumber to string for the pathPhoneNumber parameter).

Steps to Reproduce

Update your nupkg from 7.0.0 to 7.0.1 or later.

Code Snippet

// The following code that would compile fine when using 7.0.0 or earlier won't compile with 7.0.1 or later
var phoneNumber = PhoneNumberResource.Fetch(pathPhoneNumber: new Twilio.Types.PhoneNumber(number));

Technical details:

It seems like the solution is to simply pass number into the pathPhoneNumber parameter, but since this is a breaking change I wanted to (a) make sure it is intentional, and (b) find out what documentation exists for the breaking change before just moving forward with a code change.

sbansla commented 7 months ago

I will check on this.

sbansla commented 7 months ago

Hi @KirkMunroSagent This could be a bug, I have notified concerned open api spec team. Will get back to you soon.

sbansla commented 7 months ago

Hi @KirkMunroSagent I have checked with the api team, they have intentionally added this in the api. It was not committed as breaking change in open api specs, that's why it was not reflected in SDK changes.md. I have notified the api team to make such changes with breaking change.

sbansla commented 7 months ago

For future reference you can refer: SDK Release Notes: https://github.com/twilio/twilio-csharp/releases Changes log: https://github.com/twilio/twilio-csharp/blob/main/CHANGES.md

sbansla commented 7 months ago

You can also refer the latest docs: https://www.twilio.com/docs/lookup/v1-api#examples

KirkMunroSagent commented 7 months ago

@sbansla Thank you for confirming that the change was intentional. I have enough information to move forward, so I'm closing this issue.