Hello everyone,
Is there any example to create $jsonschema validator in pymongo library(in python)?
Ex:
db.createCollection("collect", {
validator: {
$jsonSchema: {
bsonType: "object",
additionalProperties: true,
required: ["component", "path"],
properties: {
component: {
bsonType: "string"
},
path: {
bsonType: "string",
description: "Set to default value"
}
}
}
)
i require to implement in pymongo instead of js.
Best Regards,
M Jagadeesh