title: How to validate empty array of strings with ajv?
body: <p>I make json validation with ajv. I need to validate array of strings. I know which elements can be placed there so I make appropriate 'enum'. But in some case enum can be empty and array can be empty too. Here is simple test:</p>
  
  <pre><code>var schema = {
      "type":"array",
      "items" : {
          "type" : "string",
          "enum" : []
      }
  }
  
  var data = [];
  
  var Ajv = require('./ajv-4.1.1.js');
  var ajv = Ajv({
      allErrors : true
  });
  var validate = ajv.compile(schema);
  var valid = validate(data);
  if (!valid)
      console.log(validate.errors);
  </code></pre>
  
  <p>As a result I get:</p>
  
  <pre><code>Error: schema is invalid:data.items.enum should NOT have less than 1 items, data.items should be array, data.items should match some schema in anyOf
  </code></pre>
  
  <p>I can add any fictive string to enum array but is it possible to validate this case in legal way? Adding 'minItems=0' restriction doesn't help.</p>
  
  <p>Is it really json schema draft restriction that I can't use empty enum?</p>
  
  <p>UPD: I expect to validate code in general case:</p>
  
  <pre><code>var array = Object.keys(someObj); // array: ["foo", "bar"]
  
  var schema = {
      "type":"array",
      "items" : {
          "type" : "string",
          "enum" : array 
      }
  }
  
  var data = ["foo"]; // valid
  var data = ["bar"]; // valid
  var data = ["bar","foo"]; // valid
  </code></pre>
  
  <p>I expect to validate code in special case:</p>
  
  <pre><code>var array = Object.keys(someObj); // array: []
  
  var schema = {
      "type":"array",
      "items" : {
          "type" : "string",
          "enum" : array 
      }
  }
  
  var data = []; // I expect to see it valid too but get error instead.
  </code></pre>