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
Setup information
hikaku version: 1.1.0
specification converter: -
implementation converter: SpringConverter
build tool and version: gradle 5.2.1
test framework: junit 5.4.0
Describe the bug
Extracting the response media type is done by checking the @ResponseBody annotation. This is fine for @Controller annotation in combination with @ResponseBody. The @RestControllerannotation combines both already. So in this case the response media type couldn't be extracted.
Expected behavior
Media type is extracted for both cases:
@Controller in combination with @ResponseBody
@RestController
Code samples:
Can you provide specifications or code snippets?
@Controller
@ResponseBody
open class GetMappingOneMediaTypeIsExtractedCorrectlyController {
@GetMapping("/todos", produces = [APPLICATION_XML_VALUE])
fun getAllTodos() = ResponseEntity.status(200).body(GetMappingOneMediaTypeIsExtractedCorrectlyController())
}
@RestController
open class GetMappingOneMediaTypeIsExtractedCorrectlyController {
@GetMapping("/todos", produces = [APPLICATION_XML_VALUE])
fun getAllTodos() = ResponseEntity.status(200).body(GetMappingOneMediaTypeIsExtractedCorrectlyController())
}
The text was updated successfully, but these errors were encountered:
Setup information
hikaku version: 1.1.0
specification converter: -
implementation converter: SpringConverter
build tool and version: gradle 5.2.1
test framework: junit 5.4.0
Describe the bug
Extracting the response media type is done by checking the
@ResponseBody
annotation. This is fine for@Controller
annotation in combination with@ResponseBody
. The@RestController
annotation combines both already. So in this case the response media type couldn't be extracted.Expected behavior
Media type is extracted for both cases:
@Controller
in combination with@ResponseBody
@RestController
Code samples:
Can you provide specifications or code snippets?
The text was updated successfully, but these errors were encountered: