3.x Helidon OpenAPITools server generator seems to ignore requestBody/required
#7686
Labels
3.x
Issues for 3.x version branch
bug
Something isn't working
open-api-tools
Tracking issues in OpenAPITools generator project
P3
Environment Details
Problem Description
The OpenAPITools generator seems to ignore the
requestBody/required
setting.There might be a problem with the generator framework rather than with the Helidon generator(s). See OpenAPITools/openapi-generator#16561
This issue represents that we need to:
Steps to reproduce
greeting.yml.txt
file attached to this issue and remove the.txt
suffix. It is an OpenAPI document for the Helidon greeting app with thePUT
operation'srequestBody
set torequired: false
.501 - not implemented
for the endpoints (because after generator the developer typically customizes the code to implement the business logic), but we can reproduce the problem without revising the generated code.curl -v -X PUT -d "{ \"message\": \"Hola\" }" http://localhost:8080/greet/greeting
which returns 501, also expected. This verifies that the generated server endpoint is invoked--that's what returns the 501.curl -v -X PUT http://localhost:8080/greet/greeting
. This does not set the request body which, according to the OpenAPI document, should not be required. The response is500 - internal server error
. The generated endpoint is not reached.JacksonBodyReader
is trying to process the missing content as it prepares to invoke the generated server endpoint.greeting.yml.txt
The text was updated successfully, but these errors were encountered: