You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hikaku version: 2.2.0 specification converter: OpenApi implementation converter: Spring build tool and version:gradle 5, kotlin 1.3.21 test framework:junit 5.1
Describe the bug
Modifying response passed as method parameter (and thus not requiring a method return type) causes Hikaku to ignore produces in @XXXMapping annotation.
Expected behavior
Hikaku Spring converter should probably check that result is not void and there is no parameter of type HttpServletResponse.
uuf6429
changed the title
Endpoints with HttpServletResponse parameters do not need to return anything and Hikaku misses this scenario
Fix endpoints with HttpServletResponse parameters causing empty produces
Jun 8, 2019
Setup information
hikaku version: 2.2.0
specification converter: OpenApi
implementation converter: Spring
build tool and version:
gradle 5, kotlin 1.3.21
test framework:
junit 5.1
Describe the bug
Modifying response passed as method parameter (and thus not requiring a method return type) causes Hikaku to ignore
produces
in@XXXMapping
annotation.Expected behavior
Hikaku Spring converter should probably check that result is not void and there is no parameter of type
HttpServletResponse
.Code samples
The following PoC produces this issue:
The root cause is the
this.value.method.hasNoReturnType()
part here:https://github.com/codecentric/hikaku/blob/master/spring/src/main/kotlin/de/codecentric/hikaku/converters/spring/extensions/ProducesSpringExtension.kt#L20
Potential solution
Off the top of my mind, this might fix the problem:
The text was updated successfully, but these errors were encountered: