Closed Juliehzl closed 3 years ago
According to the code below, if the data is None, it would call L636 data = self.validate(data, name, required=True, **kwargs). https://github.com/Azure/msrest-for-python/blob/209fa61faf8930ec14d0f60167785c3573e68dee/msrest/serialization.py#L634-L636 In this function, it passes required=True, but when data is None, the validation would fail. But sometimes client may send data with None because it is not required in header.
data = self.validate(data, name, required=True, **kwargs)
None
Hello,
Do you have an actual scenario with a SDK, or is this just hypothetical looking at the code?
Thanks!
Thanks @lmazuel ! The root cause is found in CLI code. Thanks!
According to the code below, if the data is None, it would call L636
data = self.validate(data, name, required=True, **kwargs)
. https://github.com/Azure/msrest-for-python/blob/209fa61faf8930ec14d0f60167785c3573e68dee/msrest/serialization.py#L634-L636 In this function, it passes required=True, but when data is None, the validation would fail. But sometimes client may send data withNone
because it is not required in header.