import scala.annotation.StaticAnnotation class query extends StaticAnnotation class command extends StaticAnnotation import io.circe.generic.JsonCodec @JsonCodec case class GenericError( message: String = "", code: Int = 500 ) trait Controller[F[_]] { @query def getSomething(arg: String): F[Either[GenericError, Result]] @command def doSomething(arg: Content): F[Either[GenericError, Result]] }