hseeberger / akka-http-json

Integrate some of the best JSON libs in Scala with Akka HTTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intellij warnings using Json4sSupport using parameters directive with akka-http

colinbes opened this issue · comments

When including implicit val serialization: Serialization.type = Serialization in akka-http route and including a parameters directive (using String or Symbol to define parameters) I get red squiggly lines and message type mismatch on param1, expected ParamDirectives.ParamMagnet Found Symbol. If I add multiple parameters to parameters` function I get message of too many parameters.

Code seems to run fine though.

I duplicated your example code and added parameters directive to duplicate the error - you can see gist here line 66.

I am using scala 2.12.10 and following dependency versions:
val akkaVersion = "2.6.6"
val akkaHttpVersion = "10.1.11" (tried 10.1.12 as well).
val akkaHttpJsonV = "1.32.0"
val redisVersion = "3.20"

I am more than happy to assist if I can help at all - suggestions appreciated

Are you saying that the code compiles but IntelliJ is showing errors? If this is the case – which is no surprise, since IntelliJ does this sometimes for nontrivial to infer types – please close this issue and raise one with IntelliJ (Scala plugin).

I was hoping you may have some ideas as I don't see this issue using other json libraries - issue closed