I am trying to create a collection with a json schema for validation. I got stuck on the following error and couldn't find anything related to it. I managed to create the schema using number type, but integer seems to throw this error.
Using mongodb-driver-sync and mongodb-driver-legacy v4.2.3
Caused by: com.mongodb.MongoCommandException: Command failed with error 9 (FailedToParse): '$jsonSchema type 'integer' is not currently supported.' on server 127.0.0.1:27017. The full response is {"ok": 0.0, "errmsg": "$jsonSchema type 'integer' is not currently supported.", "code": 9, "codeName": "FailedToParse"}
Tried changing the json schema from Compass and I'm getting the same error, so the problem is definitely coming from the database, not the driver.