microsoft / kiota-python

Abstractions library for Kiota generated Python clients
https://aka.ms/kiota/docs
MIT License
16 stars 11 forks source link

Align implementations and signatures of public methods handling primitives. #408

Open andrueastman opened 2 weeks ago

andrueastman commented 2 weeks ago

The implementations for send_primitive and send_collection_of_primitive_async is inconsistent.

If you take a look at the implementation for send_primitive, you'll see that it expects string literals.

However, the implementation for send_collection_of_primitive_async expects types, so making them consistent would be the breaking change.

At the next major version we should change the implementation of send_primitive to take a type parameter instead rather than string literals. This will enable better type validation and more accurate static analysis of parameter passed into the function