martypitt/swagger-springmvc — pull request #15 by williamvoor (2012-09-20 01:43:10+00:00)
Title: Added support for several Swagger features/ multiple fixes

I have made the following modifications (some are quick workarounds to make things work)

Updated Swagger to v 1.1. It worked fine.

Added responseClass to a method documentation. In Spring MVC, I assumed the response class is just the method return type. It does not read the value from annotations.

Moved the documentation resource listing to 'resources', as well as changed how base path is interpreted. This is necessary to allow the Swagger UI to access the proper API using the 'Try it out' feature. It is assumed that Base Path is the path of the API, and not the documentation path. Also, support for the 'listingPath' parameter of @Api is needed to publish documentation endpoints at non-standard places, as assumed by Swagger. For example the listing path for the Pet resources can be 'resources/pet'.

The api reader now fills parameter types, as one of "query, path, or body". Previously, everything was classified as 'path'. Also the @RequestParam annotation was not treated properly. This is now fixed.

I wrote simple test cases, but more may be necessary. Would you please review my changes and potentially suggest improvements?