All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sttp.tapir.internal.AttributeKeyMacro.scala Maven / Gradle / Ivy

The newest version!
package sttp.tapir.internal

import sttp.tapir.AttributeKey

import scala.reflect.macros.blackbox

private[tapir] object AttributeKeyMacro {
  def apply[T: c.WeakTypeTag](c: blackbox.Context): c.Expr[AttributeKey[T]] = {
    import c.universe._
    c.Expr[AttributeKey[T]](
      q"new _root_.sttp.tapir.AttributeKey(${c.universe.show(implicitly[c.WeakTypeTag[T]].tpe)})"
    )
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy