title: How to force regex pattern on dictionary values (njsonschema)
body: <p>Using <a href="https://github.com/RSuter/NJsonSchema" rel="nofollow noreferrer">njsonschema</a>, I want to generate a schema that will ensure that all values written to a dictionary will be validated against a regex pattern.</p>
  
  <p>Consider the following class:</p>
  
  <pre><code>class File
  {
      [RegularExpression("^\\d+\\.\\d+\\.\\d+\\.\\d+$")]
      public Dictionary&lt;string, string&gt; Versions { get; set; }
  }
  </code></pre>
  
  <p>The schema part that I wish that njsonschema would generate is:</p>
  
  <pre><code>"Versions": {
      "type": "object",
      "additionalProperties": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+\\.\\d+\\.\\d+$"
      }
  }
  </code></pre>
  
  <p>Instaed, njsonschema generates something like this:</p>
  
  <pre><code>"Versions": {
    "type": "object",
    "pattern": "^\\d+\\.\\d+\\.\\d+\\.\\d+$",
    "additionalProperties": {
      "type": "string"
    }
  }
  </code></pre>
  
  <p>Is there any way to acheive this?</p>
  
  <p>Thanks in advance!</p>