title: How to replace joda.DateTime with String in springfox?
body: <p>I'm trying to document my spring (version 3.2.6) app using springfox (version 2.0.2).<br>
  My model class has a org.joda.time.DateTime field.
  When this is rendered in the response model schema it looks something like this:</p>
  
  <pre><code>"dataAsOf": {
  "afterNow": true,
  "beforeNow": true,
  "centuryOfEra": 0,
  "chronology": {
    "zone": {
      "fixed": true
    }
  },
  "dayOfMonth": 0,
  "dayOfWeek": 0,
  "dayOfYear": 0,
  "equalNow": true,
  "era": 0,
  "hourOfDay": 0,
  "millis": 0,
  "millisOfDay": 0,
  "millisOfSecond": 0,
  "minuteOfDay": 0,
  "minuteOfHour": 0,
  "monthOfYear": 0,
  "secondOfDay": 0,
  "secondOfMinute": 0,
  "weekOfWeekyear": 0,
  "weekyear": 0,
  "year": 0,
  "yearOfCentury": 0,
  "yearOfEra": 0,
  "zone": {
    "fixed": true
  }
  </code></pre>
  
  <p>}
  <br/> I would really like to get rid of those useless details that my field has. <br/> So far I've tried this in my swagger configuration class:</p>
  
  <pre><code>@Configuration
  @EnableSwagger2
  public class SwaggerConfiguration {
  
  @Bean
  public Docket restfulApi() {
      String deploymentEnvironment = EnvironmentUtils.getDeployedEnvironment();
  
      Docket docket = new Docket(DocumentationType.SWAGGER_2)
                      .enable(isSwaggerEnabled(deploymentEnvironment))
                      .apiInfo(getApiInfo())
                      .directModelSubstitute(DateTime.class, String.class);
      docket = new ApiSelectorBuilder(docket)
              .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
              .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
              .build();
  
      return docket;
  }
  
  public ApiInfo getApiInfo() {
      ApiInfo apiInfo = new ApiInfo("API", "RESTful description", "1.0", "terms of service", "email@email.com", "Licence Type", "License URL");
      return apiInfo;
  }
  
  public boolean isSwaggerEnabled(String deploymentEnvironment) {
      return deploymentEnvironment.equalsIgnoreCase("local") ? true : false;
  }
  </code></pre>
  
  <p>}
  <br>So I've used Docket's directModelSubstitute method to replace the DateTime class with String class, but with no success. The dateAsOf field is still being displayed with all that extra info.<br>
  I've also tried using the @ApiOperation(dateType="java.lang.String") on my getter for the dataAsOf field, but it still didn't work.<br><br>
  Can you help me figure out what am I missing?</p>