title: How to implement snake_case for Swagger documentation in spring-boot-starter-data-rest?
body: <p>I am using swagger for the documentation of spring-boot-starter-data-rest project. In application.properties file, I have configured: <i>spring.jackson.property-naming-strategy=SNAKE_CASE</i> naming strategy but unfortunately, I am getting camelCase in swagger documentation. But, the same configuration is working if I change the project from spring-boot-starter-data-rest to spring-boot-starter-web. Below are the dependencies I am using with spring boot 2.1.1.RELEASE.  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
          &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
              &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
              &lt;parent&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
                  &lt;version&gt;2.1.1.RELEASE&lt;/version&gt;
                  &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
              &lt;/parent&gt;
              &lt;groupId&gt;com.example&lt;/groupId&gt;
              &lt;artifactId&gt;demo1&lt;/artifactId&gt;
              &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
              &lt;name&gt;demo1&lt;/name&gt;
              &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
              &lt;properties&gt;
                  &lt;java.version&gt;1.8&lt;/java.version&gt;
              &lt;/properties&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;io.springfox&lt;/groupId&gt;
                      &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
                      &lt;version&gt;2.9.2&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;io.springfox&lt;/groupId&gt;
                      &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
                      &lt;version&gt;2.9.2&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-data-rest&lt;/artifactId&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/project&gt;
  </code></pre>
  
  <p>application.properties</p>
  
  <pre><code>        spring.jackson.property-naming-strategy=SNAKE_CASE
  </code></pre>
  
  <p>package com.example.demo1;</p>
  
  <pre><code>    import org.springframework.boot.SpringApplication;
      import org.springframework.boot.autoconfigure.SpringBootApplication;
  
      @SpringBootApplication
      public class Demo1Application {
  
          public static void main(String[] args) {
              SpringApplication.run(Demo1Application.class, args);
  
          }
  
      }
  </code></pre>
  
  <p>SwaggerConfig </p>
  
  <pre><code>    package com.example.demo1;
  
      import com.fasterxml.jackson.databind.ObjectMapper;
      import com.fasterxml.jackson.databind.PropertyNamingStrategy;
      import org.springframework.context.annotation.Bean;
      import org.springframework.context.annotation.Configuration;
      import org.springframework.context.annotation.Import;
      import 
      org.springframework.data.web.config.SpringDataJacksonConfiguration;
      import springfox.documentation.builders.PathSelectors;
      import springfox.documentation.builders.RequestHandlerSelectors;
      import springfox.documentation.service.ApiInfo;
      import springfox.documentation.service.Contact;
      import springfox.documentation.spi.DocumentationType;
      import springfox.documentation.spring.web.plugins.Docket;
      import springfox.documentation.swagger2.annotations.EnableSwagger2;
  
      import java.util.ArrayList;
  
      @Configuration
      @EnableSwagger2
      @Import({SpringDataJacksonConfiguration.class})
      public class SwaggerConfig {
  
  
          public static ApiInfo metaData(String info) {
              return new ApiInfo(info,
                      "Th",
                      "1.0", "httn.html",
                      new Contact("Thd", "", "thoom"), "decense",
                      "https", new ArrayList());
          }
  
          @Bean
          public Docket cashFlowApi() {
              return new Docket(DocumentationType.SWAGGER_2).groupName("-caching").select()
                      .apis(RequestHandlerSelectors.basePackage("com.example.demo1"))
                      .paths(PathSelectors.any())
                      .build()
                      .apiInfo(SwaggerConfig.metaData("BOcPI"));
          }
      }
  </code></pre>
  
  <p>StoreController </p>
  
  <pre><code>    package com.example.demo1;
  
      import java.util.Arrays;
      import java.util.List;
  
      import io.swagger.annotations.ApiOperation;
      import io.swagger.annotations.ApiParam;
      import io.swagger.annotations.ApiResponse;
      import io.swagger.annotations.ApiResponses;
      import org.springframework.http.ResponseEntity;
      import org.springframework.web.bind.annotation.CrossOrigin;
      import org.springframework.web.bind.annotation.GetMapping;
      import org.springframework.web.bind.annotation.RequestParam;
      import org.springframework.web.bind.annotation.RestController;
  
  
      @RestController
      @CrossOrigin
      public class StoreController {
  
          @GetMapping(value = "/v1/storeMap")
          @ApiOperation(value = "Returns the list of stores", notes = "Returns the list of stores with pagination.")
          @ApiResponses(value = {@ApiResponse(code = 200, message = "Successfully retrieved the stores list"),
                  @ApiResponse(code = 204, message = "No content"), @ApiResponse(code = 206, message = "Partial Content"),
                  @ApiResponse(code = 401, message = "You are not authorized to view the resource"),
                  @ApiResponse(code = 403, message = "Accessing the resource you were trying to reach is forbidden"),
                  @ApiResponse(code = 404, message = "The resource you were trying to reach is not found"),
                  @ApiResponse(code = 500, message = "A technical error happened")})
  
          public ResponseEntity&lt;Store&gt; getStore(
                  @RequestParam(name = "country_code", required = false) @ApiParam(value = "the code)") String countryCode
                  ) {
  
              return ResponseEntity.ok(new Store(1,"ZZ"));
          }
  
      }
  </code></pre>
  
  <p>Now with this configuration, in API POST method is expecting snake_case and in the documentation, swagger is showing camelCase. I don't have the option either to change from snake_case to camelCase or spring-boot-starter-data-rest to spring-boot-starter-web.</p>