You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the ISODuration type is serialised, any value greater than 6 days (P6D) and less than 1 year (P1Y) results in a "week" format being used, but the API doesn't accept this format.
You can see that P8D has been serialised as P1W1D, which the API rejects. Changing to P6D works as expected.
I was unsure where to raise this, because it's a combination of Kiota serialisation behaviour and the Graph APIs intolerance of the "W" quantifier, but thought I'd start here.
Included some version info below, let me know if you need anything else - happy to help test if required.
Hi @frasdav
Thanks for using the Go SDK and for reporting this.
This is a case of misalignment of standards and potential implementation issue as well as far as I understand.
According to the OData ABNF an Edm.Duration is NOT and RFC 3339 Duration or an ISO 8601 Duration. And it doesn't support Year or Week. (search for durationValue =
And the conversion library converts an EDM.Duration into a duration format. Which is wider than the original.
The kiota abstractions library relies on this library under the hood.
Interestingly enough, although the template "allows" for P1W1D, the parsing below would not
I believe that the normalization method should be amended to use modulo (%) to ensure that when it normalizes days to weeks, it only does so when all days convert to weeks (no remaining day).
Could you open up an issue over there or even a pull request?
When the ISODuration type is serialised, any value greater than 6 days (
P6D
) and less than 1 year (P1Y
) results in a "week" format being used, but the API doesn't accept this format.As an example:
..results in this:
You can see that
P8D
has been serialised asP1W1D
, which the API rejects. Changing toP6D
works as expected.I was unsure where to raise this, because it's a combination of Kiota serialisation behaviour and the Graph APIs intolerance of the "W" quantifier, but thought I'd start here.
Included some version info below, let me know if you need anything else - happy to help test if required.
The text was updated successfully, but these errors were encountered: