title: OpenAPI optional object default value
body: <p>Suppose you have the following OpenAPI requestBody specification:</p>
  <pre class="lang-yaml prettyprint-override"><code>requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          properties:
            field1:
              type: number
              default: 1
            field2:
              type: object
              properties:
                subfield:
                  type: number
                  default: 2
  </code></pre>
  <p>The request body contains:</p>
  <ul>
  <li>a <code>number</code> field with default value 1</li>
  <li>an <code>object</code> field, containing itself a <code>number</code> field with default value 2</li>
  </ul>
  <p>If a client sends an empty payload, we should agree that <code>field1</code> value is supposed to be <code>1</code>, but what about <code>field2</code> value?</p>
  <ol>
  <li><code>field2</code> is not specified, so it must be considered as null</li>
  <li><code>field2</code> should be an object build with default values: <code>{subfield: 2}</code></li>
  <li>OpenAPI does not answer this question and that's up to me to decide what my application should do</li>
  </ol>