title: In the Response, i am getting scanAvailable=true when returning flux as ResponseEntity
body: <p>I am slightly confused to get the proper response when the user tries to use two rest endpoints with WebClient. I want to use it as <b>asynchronous and non-blocking</b> in the code.</p>
  <p>I am returning the Flux from the controller. The code details are as below:</p>
  <p>The Controller Class method looks like this:</p>
  <pre><code>@RequestMapping(method = RequestMethod.GET, path = &quot;/v1/repos/{userName}&quot;, produces = &quot;application/json&quot;)
      public ResponseEntity&lt;Flux&lt;GithubRepo&gt;&gt; getUserReposDetails(
              @PathVariable(name=&quot;userName&quot;,required = true) String userName) throws Exception{
          return new ResponseEntity&lt;&gt;(this.getGitRepos(userName), HttpStatus.OK);
      }
  </code></pre>
  <p>It is calling <strong>getGitRepos</strong> method. The method details are as below:</p>
  <pre><code>private Flux&lt;GithubRepo&gt; getGitRepos(String userName) {
          return webClient.get().uri(&quot;/users/{userName}/repos&quot;,userName).
                  exchangeToFlux(clientResponse -&gt; clientResponse.bodyToFlux(GithubRepo.class)).map(github-&gt;{
   github.setBranch(webClient.get()
  .uri(&quot;/repos/{userName}/{branchName}/branches&quot;,userName,github.getBranch())
  .retrieve().bodyToFlux(Branch.class).collectList());
                      return github;
                  });
      }
  </code></pre>
  <p>And WebClient is:</p>
  <pre><code>WebClient webClient =  WebClient.builder().baseUrl(&quot;https://api.github.com&quot;).
              defaultHeader(HttpHeaders.CONTENT_TYPE, &quot;application/vnd.github.v3+json&quot;).build();
  </code></pre>
  <p>The GitHub and Branch Classes are below:</p>
  <pre><code>@Data
  public class GithubRepo {
      private String name;
      private String ownerLogin;
      private Mono&lt;List&lt;Branch&gt;&gt; branch;
      
      @JsonProperty(&quot;owner&quot;)
      private void unpackNested(Map&lt;String,String&gt; commit) {
          this.ownerLogin = commit.get(&quot;login&quot;);
      }
  }
  </code></pre>
  <pre><code>@Data
  public class Branch {
      
      private String name;
      private Boolean protected;
  }
  </code></pre>
  <p>I am getting the JSON response as:</p>
  <pre><code>[
    {
      &quot;name&quot;: &quot;HelloWorld&quot;,
      &quot;ownerLogin&quot;: &quot;test&quot;,
      &quot;branch&quot;: {
        &quot;scanAvailable&quot;: true
      }
    },
    {
      &quot;name&quot;: &quot;rokehan&quot;,
      &quot;ownerLogin&quot;: &quot;test&quot;,
      &quot;branch&quot;: {
        &quot;scanAvailable&quot;: true
      }
    },
    {
      &quot;name&quot;: &quot;sNews&quot;,
      &quot;ownerLogin&quot;: &quot;test&quot;,
      &quot;branch&quot;: {
        &quot;scanAvailable&quot;: true
      }
    },
    {
      &quot;name&quot;: &quot;Test--01&quot;,
      &quot;ownerLogin&quot;: &quot;test&quot;,
      &quot;branch&quot;: {
        &quot;scanAvailable&quot;: true
      }
    }
  ]
  </code></pre>
  <p>I want to get the response as:</p>
  <pre><code>[
    {
      &quot;name&quot;: &quot;HelloWorld&quot;,
      &quot;ownerLogin&quot;: &quot;test&quot;,
      &quot;branch&quot;: [
        {
          &quot;name&quot;: &quot;asd&quot;,
          &quot;protected&quot;: false
        },
        {
          &quot;name&quot;: &quot;master&quot;,
          &quot;protected&quot;: false
        }
      ]
    },
    {
      &quot;name&quot;: &quot;rokehan&quot;,
      &quot;ownerLogin&quot;: &quot;test&quot;,
      &quot;branch&quot;: [
        {
          &quot;name&quot;: &quot;master&quot;,
          &quot;protected&quot;: false
        }
      ]
    },
    {
      &quot;name&quot;: &quot;sNews&quot;,
      &quot;ownerLogin&quot;: &quot;test&quot;,
      &quot;branch&quot;: []
    },
    {
      &quot;name&quot;: &quot;Test--01&quot;,
      &quot;ownerLogin&quot;: &quot;test&quot;,
      &quot;branch&quot;: [
        {
          &quot;name&quot;: &quot;master&quot;,
          &quot;protected&quot;: false
        }
      ]
    }
  ]
  </code></pre>
  <p>Please help me to resolve this problem.</p>