teamcarma / swagger-jaxrs-doclet

This fork is no longer actively maintained, please switch to https://github.com/conorroche/swagger-doclet
Apache License 2.0
81 stars 38 forks source link

Support for array types #71

Closed cornelcreanga closed 9 years ago

cornelcreanga commented 9 years ago

Hi,

Assume the following method:

    @POST
    @Path("/arrayofstrings")
    public void setArrayOfStrings(String[] items) {
    }

The type of the items parameter will be String[] instead of array, which is incorrect. Also, the swagger-ui will not work with types containing [] in their name.

I should be able to check in a fix on Monday - unless is already on your table.

conorroche commented 9 years ago

hey ive started looking into this, fixing it for all types of arrays will not be that trivial in java versions prior to 8 as java 8 javadoc Type has a method to get the type of array element, there is a solution around this but will take me some time

conorroche commented 9 years ago

@cornelcreanga ive just committed support for arrays let me know how it looks

cornelcreanga commented 9 years ago

Hi, I've checked and it works, thanks, I'll close the issue.