title: Spingfox not recognizing custom serializer when generating JSON model for swagger
body: <p>My jhipster v2.23.1 app uses custom serializers and deserializers for JSON parsing which I register as a module in <code>JacksonConfiguration</code>.  The REST API works as expected using my custom mapping.</p>
  
  <p>However, the JSON displayed in the auto-generated swagger documentation doesn't reflect the custom mapping.  I was hoping swagger would detect custom serializers/deserializers automatically, but since it doesn't, how can I get swagger to show my custom JSON format instead of the one it detects on its own?</p>
  
  <p>Based on the springfox documentation at <a href="http://springfox.github.io/springfox/docs/current/#configuring-springfox" rel="noreferrer">http://springfox.github.io/springfox/docs/current/#configuring-springfox</a> i've implemented the interface:</p>
  
  <pre><code>ApplicationListener&lt;ObjectMapperConfigured&gt; 
  </code></pre>
  
  <p>in my SwaggerConfiguration bean.  I can see that the <code>onApplicationEvent(ObjectMapperConfigured event)</code> method is called twice.  The first time the mapper will serialize my object as expected, the second time it will not.  It also doesn't seem to make a difference if I register my module with the mapper or not.  The object I'm working with here is a Contact.</p>
  
  <pre><code>@Override
  public void onApplicationEvent(ObjectMapperConfigured event) {
      ObjectMapper mapper = event.getObjectMapper();
  
      // Custom serialization for Contact objects
      SimpleModule contactModule = new SimpleModule("Contact Module");
      contactModule.addSerializer(new ContactSerializer(Contact.class));
      contactModule.addDeserializer(Contact.class, new ContactDeserializer(Contact.class));
  
      mapper.registerModule(contactModule);
  
      // My custom object
      Contact c = new Contact();
      c.setCity("Springfield");
      c.setEmail("someone@gmail.com");
  
      String contactJsonStr = null;
      try {
          contactJsonStr = mapper.writeValueAsString(c);
      } catch(JsonProcessingException e) {
          e.printStackTrace();
      }
      System.out.println("Serialized Contact: " + contactJsonStr);
  }
  </code></pre>
  
  <p>How can I get springfox to use my custom serializer in order to build my swagger documentation?  Or should I be using a different approach entirely?</p>