title: When using Joi with Hapi, how does one setup a require on one key but allow any and all other keys?
body: <p>I'm trying to write a <em>Joi</em> validation for a JSON object coming into a <em>Hapi</em> handler. So far the code looks like this:</p>
  
  <pre><code>server.route({
      method: 'POST',
      path: '/converge',
      handler: function (request, reply) {
          consociator.consociate(request.payload)
              .then (function (result) {
                  reply (200, result);
              });
      },
      config: {
          validate: {
              payload: {
                  value: Joi.object().required().keys({ knownid: Joi.object() })
              } 
          }
      }
  });
  </code></pre>
  
  <p>You can see the <em>Joi</em> object validation so far in the config: validate: code section above. The JSON coming in looks like this.</p>
  
  <pre><code>"key": '06e5140d-fa4e-4758-8d9d-e707bd19880d-testA',
  "value": {
      "ids_lot_args": {
          "this_id": "stuff",
          "otherThign": "more data"
      },
      "peripheral_data": 'Sample peripheral data of any sort'
  }
  </code></pre>
  
  <p>In this JSON above the key and value at the root of the object are required, and the section called <code>ids_lot_args</code> is required. The section that starts with peripheral_data could be there or not, or could be any other JSON payload. It doesn't matter, only key and value at the root level and <code>ids_lot_args</code> inside the value are required.</p>
  
  <p>So far, I'm stumbling through trying to get the <em>Joi</em> validation to work. 
  <strong>Any ideas on how this should be setup?</strong> The code repo for Joi is located at <a href="https://github.com/hapijs/joi">https://github.com/hapijs/joi</a> if one wants to check it out. I've been trying the allow all functions on objects to no avail so far.</p>