Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Return Type in Get Items Batch API Call #331

Closed
haeminlee0630 opened this issue Jan 9, 2024 · 1 comment · Fixed by #332
Closed

Error in Return Type in Get Items Batch API Call #331

haeminlee0630 opened this issue Jan 9, 2024 · 1 comment · Fixed by #332

Comments

@haeminlee0630
Copy link

We believe that there is an error with the return type of the Get Items Batch call.

Currently, both the Microsoft Learn documentation and the azure-devops-rust-api expects the return type for the call to return a Vec<String> (for rust) or an array[] (for C#).

We believe that this is an error, because when invoking the .into_body() method implemented for the Get Items Batch call, we get the "failed to deserialize" response with the additional context that "invalid type: map, expected a sequence at line 1 column 0".

Moreover, similar API calls like Get Item have a more sophisticated return type. In this case, Get Item expects a GitItem object.

Currently we are looking to custom deserialize as a workaround but do let us know if this this something we could update in the patching layer for the Rust SDK. Happy to answer any questions as well! :)

@johnbatty
Copy link
Contributor

johnbatty commented Jan 10, 2024

I've published a new release 0.15.2 with a fix for this, plus a new example git_items_get_items_batch.

Give this a go and let me know whether it works for you. I wouldn't be surprised if there are some other follow-on issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants