Problem:
Certain HTTP status do not have a response body like 201(response body optional) and 204. But currently, specific yml without response content results in codegen failure.
Tech Details:
Fails in ResponseBodyParser.kt where we do r.value.content?.values!!. values in not present for contents without body.
Expected Behaviour:
Response body should be made optional.
Controller 's method should also not have any return type (this could be tricky)
Controller's response today is set to HttpResponse where T is picked with some logic. This will have to be changed for the status which do not have response body. It might be tricky based on how open api parser returns the responses.
Looking at code bit more would help understand what I mean above.
Problem: Certain HTTP status do not have a response body like 201(response body optional) and 204. But currently, specific
yml
without response content results in codegen failure.Tech Details:
ResponseBodyParser.kt
where we dor.value.content?.values!!
.values
in not present for contents without body.Expected Behaviour: