mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 00:13:50 +00:00
Previous mustache template was using #isBodyParam outside of #operation context, so it was not effective. Even if we'd add the proper context, we'd then risk generating duplicate imports for multiple matching parameters. For this reason, this patch implements detection of an optional body parameter in code, making sure the corresponding import is added just once. Fixes #19237