Skip to content

Validation fails in case of integer attributes #6

@alelb

Description

@alelb

Hi @davidiamyou,

I noticed that if I create a resource with some integer attributes, validation fails.
This issue seems related to the JavaScript storing mechanism: all stored numbers in JavaScript are floating point, according to IEEE 754.

So when you perform json unmarshal the type of integer attributes will be float64.
And when you perform validation with reflection, crossing this misleading type with
the one declared in the schema, it always fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions