Closed ppanyukov closed 4 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azmonapplicationinsights.
Hi @ppanyukov thanks for this issue!
While this issue should be a swagger or service issue, the response of this List request is defined here, therefore the SDK is expecting that the response body should be something like this:
{
"value": [
// the array of list result
]
}
instead, the service returns the array without wrapping it. This does not conform the convention of List response in Azure. I will take some time to open an issue in azure-rest-api-specs and the progress will be tracked there.
This issue is closed in favor of the upstream issue: https://github.com/Azure/azure-rest-api-specs/issues/9463 Thanks!
Bug Report
Full repro program here: https://github.com/ppanyukov/azure-sdk-for-go-issues/tree/master/issues/webtest-locations-json-error
Using code like this ends up with JSON desrialisation error.
error (formatted for bettter readability):