trait ModelConverter {def read(cls: Class[_]): Option[Model]def toName(cls: Class[_]): Stringdef toDescriptionOpt(cls: Class[_]): Option[String]def ignoredPackages: Set[String] = Set("java.lang")def ignoredClasses: Set[String] = Set("java.util.Date")}
ModelProperty( ... allowableValues = { if (`type`.isEnum) // `type` is my Java property type of type Class<?> AllowableListValues((for(v <- `type`.getEnumConstants) yield v.toString).toList) else AnyAllowableValues }, ... )
Hi Jonathan, have you tried with the latest swagger-ui (2.0.1)? There was a fix for the "undefined" type. Or are you saying this occurs in the JSON itself?