Skip to content

Incorrect swagger-codegen-cli code generation for nested array #1033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vijayrcse opened this issue Jul 29, 2015 · 2 comments
Closed

Incorrect swagger-codegen-cli code generation for nested array #1033

vijayrcse opened this issue Jul 29, 2015 · 2 comments
Milestone

Comments

@vijayrcse
Copy link

I am using swagger-codegen-clie version 2.1.2. For a given json schema that contains nested array the model property is generated as follows

private List<List<Descriptor>> chains = new ArrayList<List>() ;

Above doesn't compile. The swagger spec is 2.0 and a sample snippet is as follows which represent the nested array

how should we get past this issue ?

generated json snippet from service end point using swagger spec 2.0

"chains": {
                "type": "array",
                "description": "Ordered descriptor chains",
                "items": {
                    "type": "array",

                    "items": {
                        "$ref": "#/definitions/Descriptor"
                    }
                }
            }
@vijayrcse
Copy link
Author

issue is same as #989

@wing328
Copy link
Contributor

wing328 commented Oct 14, 2015

Closing this as it's the same as #989 (closed)

@wing328 wing328 closed this as completed Oct 14, 2015
@fehguy fehguy modified the milestone: v2.1.4 Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants