liquibase-mongodb
liquibase-mongodb copied to clipboard
JSON schema validation not working
liquibase-mongodb -> 4.5.0
rule validations are not created.
example of a databaseChangeLog:
{ "databaseChangeLog": [ { "changeSet": { "id": "1", "author": "author", "preConditions": [ { "onFail": "WARN" }, { "documentExists": { "collectionName": "student" } } ], "comment": "Create collection", "changes": [ { "createCollection": { "collectionName": "student", "validator": { "$jsonSchema": { "bsonType": "object" "properties": { "studentId": { "bsonType": "string", "maxLength": 8, "description": "student id" }, "description": { "bsonType": "string", "maxLength": 50, "description": "description" } } } }, "validationAction": "error", "validationLevel": "strict" } } ] } } ] }