openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[dart2] [client] Added better double handling to 'mapValueOfType<T>'

Open 0xNF opened this issue 2 years ago • 1 comments

fix #15393

This PR is part of the effort to split PR #17548

Adds a special case for handling deserialization of non-explicit doubles.

e.g, given the definition:

double_obj:
  properties:
    dfield:
      type: number
      format: double      

Then sending {dfield: 2.4} will deserialize correctly, but {dfield: 2} will be cast as an int an fail the object parse.

@jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08)

0xNF avatar Feb 07 '24 13:02 0xNF

@wing328

kuhnroyal avatar Feb 15 '24 15:02 kuhnroyal