All integers >= 1000000 are treated as decimals and output with ".0"
Describe the Bug with repro steps
Summary
This defect occurs when attempting to map an int equal to or larger than 1000000. If the source value meets that criteria, it appears to be cast as a decimal when output to the destination schema. This issue occurs even if both source and destination types are integers.
Repro Steps
- Create a new data map in VS Code with a both a source and target property that is an integer
- Map from the source integer to the destination integer
- Ensure you have saved and clicked "Generate XSLT"
- Prepare test data that has an integer value >= 1000000
- Open "> Test"
- Paste your test data
- Click "Test"
- Observe that the integer value now has ".0" and appears to be treated as a "number" value
Example Schemas
source
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"title": "Root Schema",
"required": ["data"],
"properties": {
"data": {
"type": "object",
"default": {},
"title": "The data Schema",
"properties": {
"Name": {
"type": "string",
"default": "",
"title": "The Name Schema",
"examples": ["Testing1"]
},
"LoginCount": {
"type": "integer"
}
}
}
}
}
target
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"title": "Root Schema",
"required": ["data"],
"properties": {
"data": {
"type": "object",
"default": {},
"title": "The data Schema",
"properties": {
"FullName": {
"type": "string"
},
"NumberOfLogins": {
"type": "integer"
}
}
}
}
}
Screenshots or Videos
Version
v4.57.6
Additional context
No response
@DanielleCogs Let's add a tracking item for v2 after you are able to debug this a bit more
Would this be a front end issue or a backend issue that we should bring up to Sanjiv?
Would this be a front end issue or a backend issue that we should bring up to Sanjiv?
Seems like a backend, yes, but will be good to confirm first
It seems to be a backend issue. I took a look, and the frontend does send over an integer to test.
{ "DirectTranslation": { "EmployeeID": 1000000, "EmployeeName": "John Doe" } }
and we receive back a decimal value
{ "DirectTranslation": { "EmployeeID": 1000000. } }
Closing here, this is a backend issue being tracked by the backend team. No way of linking the issues so updates are unlikely to happen here