swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Add object definition returned in nested array/map to the imports

Open gurubook opened this issue 7 years ago • 3 comments

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

gurubook avatar Jan 18 '18 16:01 gurubook

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

wing328 avatar Jan 22 '18 07:01 wing328

Please use spaces intead of tab.

Also can you share a spec to reproduce the issue?

wing328 avatar Jan 22 '18 07:01 wing328

Fixed indentation issue and added return-nested.yaml

gurubook avatar Jan 22 '18 18:01 gurubook