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

DataType used for Distribution property of AvailabilityResponse is insufficient #36

Open
fgheysels opened this issue Nov 11, 2021 · 1 comment

Comments

@fgheysels
Copy link

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

We have a TSI environment that we're querying using the TSI REST API. We've generated a client library to issue queries to the TSI environment using the Open API spec's of the API.
Since today, we're suddenly facing issues: We're executing a GET availability request and the response that is returned cannot be deserialized into the C# class that was generated for the response type. We're facing an overflow: the returned distribution value does not fit inside an int32.

This is the response that is returned from the GET availability request:

{
  "availability":{
    "intervalSize":"P3600D",
    "distribution":{"2021-07-30T00:00:00Z":2208738309,"0001-01-01T00:00:00Z":32,"2011-09-21T00:00:00Z":1},
    "range":{"from":"0001-01-01T00:00:00Z","to":"2021-11-11T19:59:27Z"}},
    "retention":"P30D"
}

When deserializing this JSON to the generated AvailabilityResponse type, we receive this error:

image

I've fixed this by manually changing the Distribution dictionary in the generated Availability class to an IDictionary<string, long?>

Versions

2020-07-31

Mention any other details that might be useful


Thanks! We'll be in touch soon.

@fgheysels
Copy link
Author

Hi, do you have any news on this ?

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

No branches or pull requests

1 participant