title: How to enforce restrictions in Json Schema
body: <p>we are using JsonSchema to document our Rest APIs and I need to be sure that every string, number, array has restrictions on their maximum size applied to them i.e.</p>
  
  <ul>
  <li>all strings have a maxLength &amp; pattern set</li>
  <li>all integers/numbers have a maximum set</li>
  <li>all arrays have a maxItems set</li>
  </ul>
  
  <p>This will then allow us to run javax validation on the POJOs generated from the JsonSchema (we use jsonschema2pojo with JSR303 annotations).</p>
  
  <p>I'd rather not manually eyeball every schema passed my way so wondering if there was any automated tool to check every element for these items? If not I may be writing one :-)</p>
  
  <p>Many thanks</p>