Integer OverflowException when deserializing an int64 whose value is too large to fit in an int32
See original GitHub issueHi,
I have an OpenApi schema whose return types include some Integer type fields that have a format of int64. The Hawaii code generator generates client properties of type int64, but if I try to call the server function and it returns a value which is too large to fit in an int32, then I get this:

I had a go at debugging it and I think the error comes from
where it tries to convert the JSON value into an int, before upcasting to a (u)int64 (and then fails if the value is too large for an int32)?
It actually appears to work ok if the target client property is an Option<int64> rather than a plain int64 (different code paths in the json converter I think?).
Fwiw, I actually fell over this while having a look at making Snowflaqe understand custom ‘Long’ types (ref https://github.com/Zaid-Ajaj/Snowflaqe/issues/8#issuecomment-863949647) and then tried in Hawaii as well (given that int64 is part of the main spec here, where it’s an extension in GraphQl)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
Should be fixed in v0.29 can you give a try and confirm the fix?
Yeah I was fixing it while listening to .NET docs in the background xD