title: OpenApi required property in nested objects not working
body: <p>I need to describe an api having in request body an object with required fields and one of these fields it's an object itself having another set of required fields. </p>
  
  <p>I'm using open api v3 and swagger editor (<a href="https://editor.swagger.io/" rel="noreferrer">https://editor.swagger.io/</a>) 
  After i put my .yaml file onto the editor I generate an html client (> generate client > html). Then I open the static page index.html generated in the .zip file obtaning this schema:</p>
  
  <pre><code>Table of Contents
  body
  secureoauthservicesv2Nested_nestedobj
  body
  id
  Integer id of nested obj
  nestedobj
  secureoauthservicesv2Nested_nestedobj
  secureoauthservicesv2Nested_nestedobj
  nested object
  field1 (optional)
  String
  field2 (optional)
  String
  </code></pre>
  
  <p>I expect field1 to be required and field2 to be optional but it's not.</p>
  
  <p>This is my .yaml file</p>
  
  <pre><code>openapi: 3.0.0
  info:
      title: Example API
      description: Example API specification
      version: 0.0.1
  servers:
    - url: https://example/api
  
  paths:
    /secure/oauth/services/v2/Nested:
      post:
        summary: Try nested
        description: Used to post Nested obj
        requestBody:
          required: true
          content:
            application/json:
              schema:
                  type: object 
                  required:
                  - id
                  - nestedobj
                  properties:
                      id:
                        type: integer
                        description: id of nested obj
                      nestedobj:
                        type: object 
                        required:
                        - field1
                        description: nested object
                        properties:
                          field1:
                            type: string
                          field2:
                            type: string
        responses:
          '200':
            description: Nested object OK
  </code></pre>