Bug: setting the key to a number results in an error
bobbyiliev opened this issue · 1 comments
bobbyiliev commented
Describe the bug
Setting the key in a JSON schema to an int results to the following error:
TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received type number (22)
To Reproduce
Example schema to reproduce the problem:
{
"_meta": {
"topic": "air_quality",
"key": "id"
},
"id": "datatype.number({ \"min\": 1, \"max\": 100 })",
"timestamp": "date.recent",
"location": {
"latitude": "datatype.number({ \"max\": 90, \"min\": -90})",
"longitude": "datatype.number({ \"max\": 180, \"min\": -180})"
},
"pm25": "datatype.float({ \"min\": 10, \"max\": 90 })",
"pm10": "datatype.float({ \"min\": 10, \"max\": 90 })",
"temperature": "datatype.float({ \"min\": -10, \"max\": 120 })",
"humidity": "datatype.float({ \"min\": 0, \"max\": 100 })"
}
chuck-alt-delete commented
closed by