Skip to content

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

@R-aa-ff-aa

Description

@R-aa-ff-aa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions