Closed chuwy closed 5 years ago
It proclaims at type-level that ADT has a SchemaKey.
SchemaKey
trait Schemaed[A] { def schema: SchemaKey } sealed trait MyAdt case class Foo(a: String) extends MyAdt case class Bar(b: Int) extends MyAdt implicit val myAdtSchema: Schemaed[MyAdt] = new Schemaed[MyAdt] { def schema = SchemaKey("com.acme", "foo_or_bar", "jsonschema", SchemaVer(1,0,0)) } SchemaKey.of[MyAdt].asString // iglu:com.acme/foo_or_bar/jsonschema/1-0-0
Migrated to https://github.com/snowplow-incubator/iglu-scala-core/issues/21
It proclaims at type-level that ADT has a
SchemaKey
.