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

Incomplete model definition in WorkersRealTimeStatisticsResource causes deserialization to fail #624

Open
jassent opened this issue Jul 28, 2022 · 2 comments · May be fixed by #625
Open
Labels
status: help wanted requesting help from the community type: bug bug in the library

Comments

@jassent
Copy link

jassent commented Jul 28, 2022

This file WorkersRealTimeStatisticsResource.cs has an incomplete model definition:

[JsonProperty("activity_statistics")]
public List<object> ActivityStatistics { get; private set; }

The ActivityStatistics are defined as a list of objects. This causes the system.text.json deserializer to skip and always return empty Activity Statistics.

This is an issue with Azure Functions under Net6 which wants to use system.text.json as the default instead of Newtonsoft JsonCovert.

Could you define the actual statistics model instead of listing as "object"?

This issue also effects:

WorkersCumulativeStatisticsResource.cs:

[JsonProperty("activity_durations")]
public List<object> ActivityDurations { get; private set; }

WorkerStatisticsResource.cs

[JsonProperty("cumulative")]
public List<object> Cumulative { get; private set; }

On a related note, you have a number of tests that test these resources but the test should not pass as the result is returning empty instead of the correct values.

@jassent jassent changed the title Incomplete model definition in WorkersRealTimeStatisticsResource causes serialization to fail Incomplete model definition in WorkersRealTimeStatisticsResource causes deserialization to fail Jul 28, 2022
@jassent jassent linked a pull request Jul 29, 2022 that will close this issue
8 tasks
@JenniferMah JenniferMah added type: bug bug in the library status: help wanted requesting help from the community labels Aug 1, 2022
@JenniferMah
Copy link
Contributor

Hi @jassent! Thanks for opening an issue and creating a PR. The work included in the PR makes changes to some of our generated files. I've added DI-2274 to our team's backlog to get these changes implemented within the generator.

@jassent
Copy link
Author

jassent commented Aug 3, 2022

Understood. Thank you for reviewing and the explanation. Up to you whether to close or keep open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: bug bug in the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants