title: How to make a patternProperties field in a json schema mandatory?
body: <p>This should be a pretty quick yes or no, but I haven't been able to find the answer on SO or elsewhere. I want to make a set of schemas with a nice hierarchical dependency scheme rooted at an <code>entity</code> schema. The schema I want is</p>
  
  <pre><code>{                                                        
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "entity",                                      
      "type": "object",                                    
      "patternProperties": {                               
         "^.+Id$": {                                 
               "type": "string"                          
          }                            
      },
      "required": [
          "^.+Id$"
      ]                                          
  }    
  </code></pre>
  
  <p>Basically, I want every entity, for example a Person, to require a field called <code>somethingId</code> (for person, probably <code>personId</code>). However, using "required" in this way seems to force an actual field named <code>"^.+Id$"</code> rather than that the object must have one field matching the pattern. Is there a way to do what I want here?</p>
  
  <p>Thanks in advance.</p>