wordnik/swagger-core — pull request #45 by geeksville (2012-07-01 01:17:33+00:00)
Title: Make BeanInfo style getters optional for methods that have @ApiProperty

The previous behavior was to only assume a method is a valid getter if
it starts with the BeanInfo property convention of getXXX. This is great
for Java or if @BeanInfo is used in scala, but it seems to me that if if
a method has no args and has an ApiProperty attribute, it should be assumed
to be a getter and documented.

This allows a very dry syntax for converting existing scala classes into
documented Swagger models. For instance:

class Entity {
...
@ApiProperty
final def id:String = somecode
}

This now works with no other annotations required