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

Decimal values with high precision defined in the mock does not equal to the value in the response. #148

Open
2 tasks done
R-aa-ff-aa opened this issue Nov 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@R-aa-ff-aa
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing bugs to ensure a similar bug has not already been created

Description

Decimals with high precision are returned in response incorrectly. I assume that's because of Newtonsoft.Json wich represents all floating point numbers with double type.

Steps to reproduce

  1. Create mock like this
{
  "request": {
    "method": "GET",
    "route": "hello/{message}"
  },
  "response": {
    "body": {
        "value": 9999999999999999.999999999999
    }
  }
}
  1. See response and note that value changed.
{
  "value": 10000000000000000.0
}

Expected behavior

I expect response like this

{
  "value": 9999999999999999.999999999999
}

Screenshots

image
image

Additional context

No response

@R-aa-ff-aa R-aa-ff-aa added the bug Something isn't working label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant