title: Nestjs/swagger: Complex Objects
body: <p>I was wondering if there's a way to support complex objects for Nestjs/swagger. I just finished the migration and I am now working on the swagger documentation. A lot of my requests return complex objects and I'm wondering if there's an easier way.
  Example:</p>
  <pre><code>class Foobar{
    prop1: {
      subprop1: {
        subsub1: string;
      };
    };
  }
  </code></pre>
  <p>Becomes:</p>
  <pre><code>class SubSub{
    @ApiModelProperty()
    subsub1: string;
  }
  class SubProp{
    @ApiModelProperty()
    subporp1: SubSub;
  }
  class Foobar {
    @ApiModelProperty()
    prop1: SubProp;
  }
  </code></pre>
  <p>If I do this:</p>
  <pre><code>class Foobar{
    @ApiModelProperty()
    prop1: {
      subprop1: {
        subsub1: string;
      };
    };
  }
  </code></pre>
  <p>I get this in swagger:</p>
  <pre><code>{
    &quot;prop1&quot;: {}
  }
  </code></pre>