Add object definition returned in nested array/map to the imports
Description of the PR
Code generation on operation that return object in "nested" array/map does not add the required definition to the import list. This patch address the issue saving the contained object type during the recursion. This should solve issue #7444
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/swagger-api/swagger-codegen/graphs/contributors.
Let me know if you need help fixing it.
Ref: https://github.com/swagger-api/swagger-codegen/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account
Please use spaces intead of tab.
Also can you share a spec to reproduce the issue?
Fixed indentation issue and added return-nested.yaml