khellang/Nancy.Swagger — pull request #42 by TimSchlechter (2014-08-20 19:12:06+00:00)
Title: Operation nickname is required

Fixes an invalid nicknames bug in the SwaggerAnnotationsConverter. From the [spec](https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md#523-operation-object):

*nickname:	__Required__. A unique id for the operation that can be used by tools reading the output for further and easier manipulation. For example, Swagger-Codegen will use the nickname as the method name of the operation in the client it generates. The value MUST be alphanumeric and may include underscores. Whitespace characters are not allowed.*

This PR makes sure there is always a valid nickname. When using named routes, the route name is used as nickname. Else, route method and route path are concatenated, all invalid chars are stripped, and this result's camelCase representation is used as nickname.

The DefaultSwaggerMetadataConverter already provides a nickname, since the route name is used here.