parameters:
departureDate:
name: departureDate
in: query
required: true
type: string
format: datepublic ResponseEntity<Results> someSearchGet(
...
@ApiParam(value = "Blah", required = true, defaultValue = "2016-12-25")
@RequestParam(value = "departureDate", required = true, defaultValue="2016-12-25")
LocalDate departureDate,
...
http://localhost:8080/v1/mysearch/search?departureDate=2016-12-12
Failed to convert value of type [java.lang.String] to required type [org.joda.time.LocalDate];nested exception is org.springframework.core.convert.ConversionFailedException:
Failed to convert from type [java.lang.String] to type [@io.swagger.annotations.ApiParam @org.springframework.web.bind.annotation.RequestParam org.joda.time.LocalDate] for value '2016-12-12';
nested exception is java.lang.IllegalArgumentException: Invalid format: "2016-12-12" is malformed at "16-12-12"
Failed to convert value of type [java.lang.String] to required type [org.joda.time.LocalDate];
nested exception is org.springframework.core.convert.ConversionFailedException:
Failed to convert from type [java.lang.String] to type [@io.swagger.annotations.ApiParam @org.springframework.web.bind.annotation.RequestParam org.joda.time.LocalDate] for value '2016-12-22T21:03:41';nested exception is java.lang.IllegalArgumentException: Invalid format: "2016-12-22T21:03:41" is malformed at "16-12-22T21:03:41"
@ApiParam(value = "Blah", required = true, defaultValue = "2016-12-25")
@RequestParam(value = "departureDate", required = true, defaultValue="2016-12-25")
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate departureDate
For issues related to swagger-codegen, please open a ticket on the project.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.