Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24846

disallow extra fields when validating documents

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Query

      I would like to be able to validate the documents so that no extra fields, beyond the ones already declared. For example if i have a schema like this :

      
          "group1.a": {
            "$type": "int"
          },
          "group1.b": {
            "$type": "int"
          }
      
      

      I would like the following document to fail:

          {
             "group1": {
                "a": 1,
                "b": 2,
                "c": 3
             }
          }
      

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            cip123 Ciprian Trusca
            Votes:
            4 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: