Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-895

Documentation missing for createCollection option validator key

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.18
    • Affects Version/s: None
    • Component/s: None

      When I look at https://mongodb.github.io/node-mongodb-native/2.2/api/Db.html#createCollectiondo not see documentation for the validator key. If I create a validator key and assign it a value like described in https://docs.mongodb.com/v3.2/reference/method/db.createCollection/#db.createCollection , it works. But that documentation is for the mongodb shell.

      Also, the only way I could figure out that I had to pass validator to Db.createCollection() instead of being able to pass it to Db.collection() was by [searching the repo for `validator`](https://github.com/mongodb/node-mongodb-native/search?utf8=%E2%9C%93&q=validator) and seeing that [a test uses this feature](https://github.com/mongodb/node-mongodb-native/blob/393f6b0e1b18bb6c0181fd0678d1efa3dae5568c/test/functional/document_validation_tests.js)

            Assignee:
            Unassigned Unassigned
            Reporter:
            binki Nathan Phillip Brink (binki)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: