2

I have a lot of Apis in my Spring application. And I need to create a swagger for it. One of the field types, that I use a lot in different classes is: MyDate. Which in the swagger I want to be defined as string with a pattern. I can use the next line in order to show the field in the swagger as string instead of MyDate:

new Docket(DocumentationType.SWAGGER_2).directModelSubstitute(MyDate.class, String.class)

But is there a way to add the pattern to all the fields from this type automatically?

Thanks.

Sarah Sh
  • 451
  • 5
  • 15

0 Answers0