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

Mininum and Maximum are decimals and don't work for Doubles/Longs #1479

Closed
Robulane opened this issue Nov 22, 2023 · 1 comment
Closed

Mininum and Maximum are decimals and don't work for Doubles/Longs #1479

Robulane opened this issue Nov 22, 2023 · 1 comment

Comments

@Robulane
Copy link
Contributor

Describe the bug
If the schema has a minimum set to Double.MinValue, the library will crash with the following error

ExceptionType: System.OverflowException
ExceptionMessage: Value was either too large or too small for a Decimal.
InnerExceptionType:
InnerExceptionMessage:
StackTrace:
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Decimal.Parse(String s, NumberStyles style, IFormatProvider provider)
at Microsoft.OpenApi.Readers.V2.OpenApiV2Deserializer.<>c.<.cctor>b__83_141(OpenApiSchema o, ParseNode n)
at Microsoft.OpenApi.Readers.ParseNodes.PropertyNode.ParseField[T](T parentInstance, IDictionary2 fixedFields, IDictionary2 patternFields)
at Microsoft.OpenApi.Readers.V2.OpenApiV2Deserializer.LoadSchema(ParseNode node)

@MaggieKimani1
Copy link
Contributor

Closed by #1480

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

2 participants