Enabling schema validation logging on the server side can be done in following way:
CreateCollectionOptions.ValidationAction = DocumentValidationAction.Warn;
(driver/3.0.0/api/MongoDB.Driver/MongoDB.Driver.CreateCollectionOptions.ValidationAction.html#MongoDB_Driver_CreateCollectionOptions_ValidationAction)
On the driver side, our specifications for all drivers require to raise the errors that are coming for the server. .NET driver follows this requirement.
Hi Kishore,
Enabling schema validation logging on the server side can be done in following way:
CreateCollectionOptions.ValidationAction = DocumentValidationAction.Warn;
(driver/3.0.0/api/MongoDB.Driver/MongoDB.Driver.CreateCollectionOptions.ValidationAction.html#MongoDB_Driver_CreateCollectionOptions_ValidationAction)
Please find more documentation on this, and how to fetch the server logs here:
https://www.mongodb.com/docs/manual/core/schema-validation/handle-invalid-documents/#std-label-schema-validation-handle-invalid-docs
On the driver side, our specifications for all drivers require to raise the errors that are coming for the server. .NET driver follows this requirement.