title: How to pass file content to swagger @ExampleProperty annotation value?
body: <p>I am using swagger 3.0.0-Snapshot to create documentation for my Spring Boot application.
  My maven dependencies are</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;3.0.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>My swagger config class is as simple as possible:</p>
  
  <pre><code>@Configuration
  @EnableSwagger2WebMvc
  public class SwaggerConfig {
      @Bean
      public Docket api() {
  return new Docket(DocumentationType.SWAGGER_2)
                  .useDefaultResponseMessages(false)
                  .select()
           .apis(RequestHandlerSelectors.basePackage("com.mycompany.cs"))
                  .paths(PathSelectors.any())
                  .build()
                  .pathMapping("/")
                  .useDefaultResponseMessages(false);
      }
  </code></pre>
  
  <p>And my controller method has the following annotation:</p>
  
  <pre><code>@ApiOperation(value = "Hello world", httpMethod = "POST")
      @ApiResponses(value = {
              @ApiResponse(code = 200, message = "OK",
                      examples = @Example(value = @ExampleProperty(mediaType = "application/json",
                              value = exampleValue)))
      })
  </code></pre>
  
  <p>It is working and shows in Swagger UI "Example Value" field value that has constant string exampleValue that is private static String.</p>
  
  <p>The question is how to pass the content of json file that is in resources folder to @ExampleProperty value?</p>
  
  <p>I tried to read file content in static block and pass it to initialize final String with it, but then the compiler says that "Attribute value has to be constant".</p>
  
  <p>The content of json file must be shown in example field in Swagger UI.</p>