title: Why is Swagger's api-docs response wrapped in additional JSON Object?
body: <p>I added swagger to my Spring Boot application by including the dependency:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;io.springfox&lt;/groupId&gt;
    &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
    &lt;version&gt;2.3.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>and adding a config class:</p>
  
  <pre><code>@Configuration
  @EnableSwagger2
  public class SwaggerConfig {
  
      @Bean
      public Docket api(){
          return new Docket(DocumentationType.SWAGGER_2)
              .select()
              .apis(RequestHandlerSelectors.any())
              .paths(Predicates.or(PathSelectors.regex("...")))
              .build()
              .apiInfo(apiInfo());
      }
  
      private ApiInfo apiInfo() {
          return new ApiInfo(...);
      }
  }
  </code></pre>
  
  <p>I can now access <code>/v2/api-docs</code> and get some JSON that seems to describe my API. However, the JSON is wrapped in another JSON object like this (abbreviated):
  <code>
  {"value":"{\"swagger\":\"2.0\",\"info\":...}
  </code></p>
  
  <p>The <code>{"value": "..."}</code> Object isn't needed and causes errors in swagger-ui. The PetStore example doesn't has this extra level. This this a bug? Or a config issue?</p>
  
  <p>PS: I also created a <a href="https://github.com/springfox/springfox/issues/1156" rel="nofollow">github issue</a> for that</p>