Closed randers-bit closed 2 years ago
This project is unaffiliated with swagger-akka-http - closing - I will open an issue over there
PS that JsonScalaEnumeration only works with enum instances directly, not if they are wrapped by collections.
I found that myself about JsonScalaEnumeration, like i wrote in stack overflow. In swagger i found answer acceptable for generating proper swagger file but now im concerned about journal in akka persistence.
I found that in journal enums in array are generated like in wiki for deprecated version
{"weekday":{"enumClass":"Weekday","value":"Fri"}}
but i didn't saw any deprecation warnings in logs or anything, and it seems to work properly.
It is safe to assume that this format will work and just leave it or i should be worried about it in future/now?
I don't know anything about akka persistence. I never ever use Scala 2 enumerations. They are not deprecated but there are better alternatives - Enumeratum for Scala 2 and the new Scala 3 enums if you want to use Scala 3.
There are some tests relating to Scala 2 enumerations that don't work in Scala 3 - eg https://github.com/FasterXML/jackson-module-scala/issues/535
Thank you for your answers @pjfanning :)
Hello i read FAQ and i know that when serializing Enumerations @JsonScalaEnumeration annotations should be used like described.
But what to do when enumeration is in collecion like Set/Seq?
I asked on stack overflow in context of swagger - Stack Overflow question but now i encountered old version of enumeration serialization in akka persistence and im concerned how to resolve this.
I it seems like missing documentation or functionality for this.