Enforce object non emptyness using json schema
<p>We can enforce empty attribute of type object as follows:</p>

<pre><code>{
   "description": "voice mail record",
   "type": "object",
   "additionalProperties": false,
   "properties": {}
}
</code></pre>

<p>as explained <a href="https://stackoverflow.com/questions/3521135/enforce-empty-json-schema">here</a>.</p>

<p>Now I want to validate attribute which</p>

<ol>
<li>is of object type,</li>
<li>dont have any predefined properties</li>
<li>can have properties of type string or numeric</li>
<li>should not be empty</li>
</ol>

<p>Enforcing non-emptyness (point 4) is what I am unable to guess. This is somewhat opposite of enforcing emptyness as in above example. My current json schema excerpt looks like this:</p>

<pre><code>"attribute": 
{
    "type": "object",
    "additionalProperties": { "type": ["string","number","integer"] }
}
</code></pre>

<p>But above does not enforce non-emptyness. How can I accomplish this?</p>