microsoft / kiota-abstractions-dotnet

Abstractions library for the Kiota generated SDKs in dotnet
https://aka.ms/kiota/docs
MIT License
24 stars 21 forks source link

IRequestAdapter should have `sendEnum` and `sendEnumCollection` methods #199

Open andrueastman opened 4 months ago

andrueastman commented 4 months ago

To align with other languages like go/java, IRequestAdapter should have sendEnum and sendEnumCollection methods to handle APIs that return enums.

At the moment this is mapped to sendPrimitive methods which does not align with other languages. This is a breaking change and should be resolved in the next major version of the lib.

baywet commented 4 months ago

Thanks for starting a discussion on this. Since send primitive performs the work of both, what issue are you trying to resolve by adding specific methods?

andrueastman commented 4 months ago

Hey @baywet,

From my perspective, this is more about consistency/alignment across languages which we can look into taking care of in the next breaking change of the library. Furthermore, in the event someone is implementing their own version of IRequestAdapter it is unclear that they can handle enums in the primitive section. Updating the interface makes things clearer I think.