Changing Mongoose schema type not working

I have a mongoose schema with a property which was a string array.

docs: [String]

I changed the type to an object array as follows

docs: [{ url: String, type: String }]

But when I create a new item, the docs field is still validated with the type string and the following error is thrown.

enter image description here

I even tried dropping the collection and it still not works.