We have been developing collections in mongoDB, with
db.createCollection('xyzCollection', {
validator:
{
$jsonSchema: {....}}})
Now we are moving to AWS DocumentDB & this script fails with the error: 
Can someone help identifying the correct keyword to apply validator directly to schema, and not using backend code to do this.
I tried checking supported keywords on AWS documentations : https://docs.aws.amazon.com/documentdb/latest/developerguide/mongo-apis.html#mongo-apis-database I have also gone through with this link: Alternative to schema validation in AWS DocumentDB But the question is remains unsolved.
But 'validator' is not mentioned anywhere.
Does this mean that we cannot apply validations directly? Do we only have the option to apply validations via API.