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

A quick fix to support 1 sub array like [[Object]]

Open faresd opened this issue 9 years ago • 4 comments

A pull request following ticket #3194, Imports don't support nested Arrays and Maps.

faresd avatar Jun 22 '16 13:06 faresd

@faresd thanks for the PR. I believe your fix only handle 1D and 2D arrays. Ideally we are looking for a recursive way to support arrays of any dimensions.

wing328 avatar Jun 23 '16 02:06 wing328

@faresd I've filed https://github.com/swagger-api/swagger-codegen/pull/3199 to support array/map of enum for any dimensions. Here is the function with the recursive logic:

https://github.com/swagger-api/swagger-codegen/pull/3199/files#diff-0c1b6d04d7c2c41f87f7c710a5610d88R1634

Would you have cycle to revise your PR to recursively identify the inner type of array/map for import?

wing328 avatar Jun 23 '16 10:06 wing328

@wing328 I don't think I will have the time implement the recursion.

faresd avatar Jul 12 '16 08:07 faresd

@faresd thats ok. We appreciate your contribution and will merge this PR after 2.2.0 issue if no question from anyone.

wing328 avatar Jul 12 '16 11:07 wing328