You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Program throws an error Value was either too large or too small for an Int32. System.OverflowException for properties that are int64 data types, and whose minimum value is specified to be lower than (farther from zero than) -2147483648
OpenAPI Specifications
This is the specification in which I encountered the issue: netbox API
Additional context
I don't know whether this is an issue in your code or in the NJsonSchema library. The lowest value permissible in int64 is -9223372036854775808, but this error is received whenever a minimum value is specified lower than the int32 limit of -2147483648.
For example, this YAML does not produce the error:
WritableL2VPNRequest:
type: object
description: Adds support for custom fields and tags.
properties:
identifier:
type: integer
maximum: 9223372036854775807
minimum: -2147483648
format: int64
nullable: true
But this one does:
WritableL2VPNRequest:
type: object
description: Adds support for custom fields and tags.
properties:
identifier:
type: integer
maximum: 9223372036854775807
minimum: -2147483649
format: int64
nullable: true
And this one (that should be legal!) is right out!
WritableL2VPNRequest:
type: object
description: Adds support for custom fields and tags.
properties:
identifier:
type: integer
maximum: 9223372036854775807
minimum: -9223372036854775808
format: int64
nullable: true
The netbox API I linked above will succeed if you globally search/replace all instances of minimum: -9223372036854775808 with minimum: -2147483648
The text was updated successfully, but these errors were encountered:
@christianhelle Lol, thanks so much for the fast response. There's no urgency for a resolution on this - I've worked around the issue handily. Indeed, it might not even be your issue... perhaps the OpenAPI is in error.
Describe the bug
Program throws an error
Value was either too large or too small for an Int32. System.OverflowException
for properties that are int64 data types, and whoseminimum
value is specified to be lower than (farther from zero than) -2147483648OpenAPI Specifications
This is the specification in which I encountered the issue: netbox API
Additional context
I don't know whether this is an issue in your code or in the NJsonSchema library. The lowest value permissible in int64 is -9223372036854775808, but this error is received whenever a
minimum
value is specified lower than the int32 limit of -2147483648.For example, this YAML does not produce the error:
But this one does:
And this one (that should be legal!) is right out!
The netbox API I linked above will succeed if you globally search/replace all instances of
minimum: -9223372036854775808
withminimum: -2147483648
The text was updated successfully, but these errors were encountered: