sealed abstract class Status(val id: String) {
def self: Status = this
}
case object New extends Status("new")
case object Processed extends Status("processed")
Using this kind of constructions in model definitions leads to errors on Java 8 and below.
at java.lang.Class.getSimpleName(Class.java:1330)
at java.lang.Class.getCanonicalName(Class.java:1399)
at io.swagger.jackson.ModelResolver._isOptionalType(ModelResolver.java:175)
at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:157)
at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:112)
at io.swagger.scala.converter.SwaggerScalaModelConverter.resolveProperty(SwaggerScalaModelConverter.scala:70)
at io.swagger.converter.ModelConverterContextImpl.resolveProperty(ModelConverterContextImpl.java:80)
at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:464)
at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:185)
at io.swagger.scala.converter.SwaggerScalaModelConverter.resolve(SwaggerScalaModelConverter.scala:86)
at io.swagger.converter.ModelConverterContextImpl.resolve(ModelConverterContextImpl.java:100)
at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:236)
at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:185)
at io.swagger.scala.converter.SwaggerScalaModelConverter.resolve(SwaggerScalaModelConverter.scala:86)
at io.swagger.converter.ModelConverterContextImpl.resolve(ModelConverterContextImpl.java:100)
at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:161)
at io.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:112)
at io.swagger.scala.converter.SwaggerScalaModelConverter.resolveProperty(SwaggerScalaModelConverter.scala:70)
at io.swagger.converter.ModelConverterContextImpl.resolveProperty(ModelConverterContextImpl.java:80)
at io.swagger.converter.ModelConverters.readAsProperty(ModelConverters.java:58)
at io.swagger.util.ParameterProcessor.applyAnnotations(ParameterProcessor.java:263)
at play.modules.swagger.PlayReader.readImplicitParam(PlayReader.java:390)
at play.modules.swagger.PlayReader.readImplicitParameters(PlayReader.java:360)
at play.modules.swagger.PlayReader.read(PlayReader.java:198)
at play.modules.swagger.PlayReader.read(PlayReader.java:63)
at play.modules.swagger.PlayReader.read(PlayReader.java:57)
at play.modules.swagger.ApiListingCache$.$anonfun$listing$1(ApiListingCache.scala:17)
at scala.Option.orElse(Option.scala:289)
at play.modules.swagger.ApiListingCache$.listing(ApiListingCache.scala:11)
at play.modules.swagger.SwaggerPluginImpl.<init>(SwaggerPlugin.scala:164)
at myutil.environment$ApplicationEnvironment.<init>(BootstrapLoader.scala:170)
at myutil.BootstrapLoader.load(BootstrapLoader.scala:31)
at play.core.server.ProdServerStart$.start(ProdServerStart.scala:51)
at play.core.server.ProdServerStart$.main(ProdServerStart.scala:25)
at play.core.server.ProdServerStart.main(ProdServerStart.scala)
It uses jackson ModelConverter and crashes whole plugin.
I'll file this issue to swagger-scala-module as well.
Using this kind of constructions in model definitions leads to errors on Java 8 and below.
It uses jackson ModelConverter and crashes whole plugin.
I'll file this issue to swagger-scala-module as well.