Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[cpp-restsdk] Update json double/float parse. #9577

Merged
merged 2 commits into from
May 28, 2021

Conversation

adameste
Copy link
Contributor

Fix cpp-restsdk double and float parse.

double.NaN was parsed when server doesn't ensure the floating point value has decimal point in in.

Fixed incorrect server response json parsing. For example the following json:

{
    "double_value": 42
}

As of now, the value 42 is parsed as NaN, because json library returns false on is_double().
Additional condition ensures NaN is not returned when not needed.
Implemented for both float & double data types.

Fix cpp-restsdk double and float parse.

double.NaN was parsed when server doesn't ensure the floating point value has decimal point in in.
@wing328
Copy link
Member

wing328 commented May 27, 2021

Thanks for the PR. Please follow the instruction in the PR template below to update the samples so that CI can test the change:

  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.

cc @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @MartinDelille (2018/03) @muttleyxd (2019/08)

@adameste
Copy link
Contributor Author

Ran all three above mentioned commands & commited changes.

@wing328 wing328 added this to the 5.2.0 milestone May 28, 2021
@wing328 wing328 merged commit 73b34ad into OpenAPITools:master May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants