Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

0xNF
Copy link
Contributor

@0xNF 0xNF commented Feb 7, 2024

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)

@kuhnroyal
Copy link
Contributor

@wing328

@pisolofin
Copy link

@kuhnroyal Can you merge this PR?

@wing328 wing328 merged commit bfcfc6f into OpenAPITools:master Nov 11, 2024
16 checks passed
@wing328
Copy link
Member

wing328 commented Nov 11, 2024

sorry for the delay. just merged

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] [dart] deserialization a double without decimal place will always return null value
4 participants