documentation - Java 8 LocalDate displaying in swagger -


i have dto contains field of java 8 localdate type. jackson annotations it's possible set format iso.date , works good. swagger (i have version 2.+) see localdate.class object

localdate { month (integer, optional), year (integer, optional) } 

(that's true but...) want dipsay string format works util.date. how can solve it?

i facing same problem, added

@bean public docket docket() {     return new docket(documentationtype.swagger_2)                 .groupname("name")                 .directmodelsubstitute(localdatetime.class, string.class)                 .directmodelsubstitute(localdate.class, string.class)                 .directmodelsubstitute(localtime.class, string.class)                 .directmodelsubstitute(zoneddatetime.class, string.class)                 .apiinfo(apiinfo())                 .select()                 .paths(paths())                 .build(); } 

in docket configuration.

directmodelsubstitute makes swagger treat localdate string class


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -