ServiceStack/ServiceStack — pull request #843 by jamesgroat (2013-10-09 18:17:12+00:00)
Title: Document enums as numeric in Swagger when appropriate

ServiceStack.Text will serialize enums as integers when either the Enum
has [Flag] attribute or if JsonConfig.TreatEnumAsInteger == true.

This update makes swagger document the property using the correct underlying
type for the enum (int, long, byte, etc) and displays both the numeric
value and the enum name in documentation like so:

status (int, optional) = ['0 (Active)' or '1 (Locked)']

It uses the same check for numeric vs string that ServiceStack.Text uses when serializing: IsNumericType() from ReflectionExtensions.cs.