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
Spring supports optional RequestBody just like the Query Parameter. However, this is currently implemented, even if Optional is not set as a configuration in the parameter.
Suggest a fix
Not sure, but use optionalDataType only if useOptional is set
Bug Report Checklist
Description
The OpenAPI Java generator creates for optional (non-required) request bodies always a Optional parameter.
openapi-generator version
OpenAPI declaration file content or url
Generation Details
But happens also with other Java generators.
Expected (like Version 7.0.1)
Actual with 7.1.0
Steps to reproduce
useOptional
tofalse
Version 7.0.1 generates without Optional, 7.1.0 with Optional, which is unexpected.
Related issues/PRs
#16972
#16971
We now have the opposite effect of #16971:
Suggest a fix
Not sure, but use optionalDataType only if
useOptional
is setInstead of:
use:
The text was updated successfully, but these errors were encountered: