Skip to content

MulipleOf Validation is failing for numbers 999999999.99, 999999999.90 #1109

@stmey

Description

@stmey

Referring to PR https://github.com/getkin/kin-openapi/pull/1068/changes

I encountered and issue in Test-Case TestIssue817 of schema_test.go. If you add the value 999999999.99 to the validData array, the test fails.
We have encountered this as we were testing the borders or our API. In Version 0.1.31.0 we did not have the issue.

Proposal: Instead of using precision "%.10f" for every use case, we could determine the precision dynamically based on the multipleOf value

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