I have a Swagger API endpoint which has a return type Task<IEnumerable> This returns correct data as I do a GET request through the Browser and it generates correct results.
I generated the service API call code as following using Radzen Pro tool.
var response = await httpClient.SendAsync(message);
response.EnsureSuccessStatusCode();
using (var stream = await response.Content.ReadAsStreamAsync())
{
return await JsonSerializer.DeserializeAsync<IEnumerable<SoftwareImageDto>>(stream, new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
PropertyNameCaseInsensitive = true,
});
}
I am trying to invoke above method which has return type Task<IEnumerable> .
var resFromAPI = await Wmdsui.GetApiSoftwareItemFilterSoftwareImageDataFilters(serializedReq);
The results are different in resFromAPI than I expect. I am am not able to deserialize it to List.
I see different object being generated, although it has data inside it with properties _items.