wordnik/swagger-core — pull request #369 by matt-thomson (2013-11-05 18:00:26+00:00)
Title: Use the correct body type for methods without ApiParam annotations

In JAX-RS, the body is bound to the first unannotated parameter of a resource method. Swagger attempts to cope with this by looking up the type of this parameter, but it gets this wrong, choosing instead the type of the first parameter to the method (which could be, for example, a PathParam). It will also add multiple copies if there is more than one unannotated parameter.

This doesn't happen if the body is annotated in any way (for example, with @ApiParam).

This pull request contains a test to reproduce the problem, and a fix.