restVersioning icon indicating copy to clipboard operation
restVersioning copied to clipboard

Swagger not working with this version strategy

Open ankool opened this issue 7 years ago • 0 comments

Is there any example of springfox swagger working with this version strategy ? I am using latest springfox library v2.9.2.

This version strategy creates mapping as below and is working as request navigates to different function based on version annotation value

V1:
"Mapped"{[/api/work/{vehicleId}],methods=[GET],produces=[application/json],custom=[com.work.version.service.VersionRequestCondition@390e814c]}"
 onto public org.springframework.http.ResponseEntity<com.work.models.WorkResponse>

V2:
"Mapped"{[/api/work/{vehicleId}],methods=[GET],produces=[application/json],custom=[com.work.version.service.VersionRequestCondition@1ed0128b]}"
 onto public org.springframework.http.ResponseEntity<com.work.models.WorkV2Response>

But with springfox we cannot create docket that maps to both version based on same path, method, and produces but different custom or response model.

ankool avatar Jul 04 '18 17:07 ankool