title: Flatten fields in request
body: <p>I have simple request:</p>
  <pre><code>@Getter
  @Setter
  @NoArgsConstructor
  @AllArgsConstructor
  public class Request
  {
      private Address address;
      private Name name;
  }
  </code></pre>
  <p>where <code>Address</code> and <code>Name</code>:</p>
  <pre><code>@Getter
  @Setter
  @NoArgsConstructor
  @AllArgsConstructor
  public class Address
  {
      private String postalCode;
      private String city;
  }
  
  @Getter
  @Setter
  @NoArgsConstructor
  @AllArgsConstructor
  public class Name
  {
      private String firstName;
      private String lastName;
  }
  </code></pre>
  <p>and easy controller:</p>
  <pre><code>@RestController
  public class Controller
  {
      @PostMapping(path = &quot;data&quot;, produces = MediaType.APPLICATION_JSON_VALUE)
      public ResponseEntity&lt;String&gt; post(@RequestBody Request request)
      {
          return ResponseEntity.ok(&quot;1234&quot;);
      }
  }
  </code></pre>
  <p>To make a request I have to use postman with request body like:</p>
  <pre><code>{
      &quot;address&quot;: {
          &quot;postalCode&quot;:&quot;aaaa&quot;,
          &quot;city&quot;:&quot;bbb&quot;
      },
      &quot;name&quot;: {
          &quot;firstName&quot;: &quot;tom&quot;,
          &quot;lastName&quot;: &quot;xyz&quot;
      }
  }
  </code></pre>
  <p>And my question: is there any way to &quot;flatten&quot; this request to simple attributes:</p>
  <pre><code>{
      &quot;city&quot;:&quot;bbb&quot;
      &quot;postalCode&quot;:&quot;aaaa&quot;,
      &quot;firstName&quot;: &quot;tom&quot;,
      &quot;lastName&quot;: &quot;xyz&quot;
  }
  </code></pre>