This PR ensures that type names are derived from dealiased underlying types.
Inspired by an issue reported in tapir:
//> using scala 3.3.0-RC6
//> using dep com.softwaremill.sttp.tapir::tapir-core:1.4.0
import sttp.tapir.*
import sttp.tapir.generic.auto.*
case class Foo[T](t: T)
object Domain1:
type Type = Int
object Domain2:
type Type = String
@main
def main =
val d1Schema = summon[Schema[Foo[Domain1.Type]]]
val d2Schema = summon[Schema[Foo[Domain2.Type]]]
println(d1Schema.name.map(_.show)) // Some(.Foo[Type]), should be Some(.Foo[Int])
println(d2Schema.name.map(_.show)) // Some(.Foo[Type]), should be Some(.Foo[String])
This issue doesn't happen for Scala 2, where dealiasing seems to be correctly applied.
Fixes #467 for Scala 3
This PR ensures that type names are derived from dealiased underlying types. Inspired by an issue reported in tapir:
This issue doesn't happen for Scala 2, where dealiasing seems to be correctly applied.