Skip to content

schema of number is float64 #280

@Tevic

Description

@Tevic
// Number
Min        *float64 `json:"minimum,omitempty" yaml:"minimum,omitempty"`
Max        *float64 `json:"maximum,omitempty" yaml:"maximum,omitempty"`
MultipleOf *float64 `json:"multipleOf,omitempty" yaml:"multipleOf,omitempty"`

I can see the schema of number is float64, and the default json decoder marshal number into float64, however there will be precision problems between float64 and int64, so the validation may not be correct.

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