Skip to content

[BUG] [dart] deserialization a double without decimal place will always return null value #15393

@chowwaiming

Description

@chowwaiming

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When the json body contain a double/decimal field without decimal place, the deserialization process will throw exception. e.g.
when the json is
{
"myDouble" : 0.0
}
the deserialization is ok

however if it is
{
"myDouble" : 0
}

the deserialization throw exception

openapi-generator version

v6.5.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions