Skip to content

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

@Robulane

Description

@Robulane

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions