|
Post by nateroiger on Dec 2, 2020 18:30:48 GMT
Several definitions contain capacity in bytes field, with type 'integer'. For the openapi-generator, an integer is translated as int32; thereby truncating many capacity values over 32 bits in length
The specification and schema should be modified to convert integer types to 'long'
See Volume 1.5.0 CapacityBytes as an example.
|
|
|
Post by mraineri on Dec 3, 2020 13:54:55 GMT
It seems like OpenAPI added special "format" keywords to distinguish between 32-bit and 64-bit integers. JSON Schema doesn't make this distinction.
For OpenAPI, it looks like we need to do this to all integers: "type": "integer", "format": "int64"
|
|
|
Post by nateroiger on Dec 3, 2020 21:15:01 GMT
To handle all integers there is an option to the generator `--type-mappings=integer=int64`; but I was thinking it would be only the Capacity Bytes values that need this 'long' option. @odata.MemberCount values do not need to be long, for example.
But a blanket int64 would be fine as well
|
|
|
Post by mraineri on Dec 8, 2020 15:17:10 GMT
At least today, since everything stems from CSDL, we only use "Edm.Int64" for all of our integers, so by nature of this fact they're all supposed to be 64-bit capable (even though there are plenty of cases where it's well beyond what's needed).
|
|