Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(go): only import
reflect
when using it (OpenAPITools#19967)
The api.mustache template only uses the reflect package if there is a query parameter which `isCollectionFormatMulti`. The import for the reflect package is however added if _any_ parameter is `isCollectionFormatMulti`. If the parameter which `isCollectionFormatMulti` e.g. is in the body instead of the query, this leads to the import being part of the generated code but not used and the code does not compile. This updates reworks the import handling for the `reflect` package so that it is only added if there is a query parameter which `isCollectionFormatMulti`. Co-authored-by: Per Hallgren <[email protected]>
- Loading branch information