Closed SotaNakajima closed 5 years ago
Parameter are being taken from constructor. Macros doesn't make difference for where it comes from. From case class definition or from companion object. Simplest solution i can propose, not sure if is fits with your vision, is to not overload constructors. BTW: what library do you use for json deserialization and how do you handle the same problem there?
Oh I see. Unfortunately this is not a viable solution for me. This would be my first time dabbling in json related tasks so I have not run into this issue before. Sorry I can't help. Thanks for the clarification!
If a case class has a companion object, it seems like we are unable to get the case class' parameters if there is an apply method with a parameter defined. The json schema will return a schema with the parameter's schema as the properties. See below.
yields
Is there any way to get the schema of the parameters of the case class (like t3) if there is an apply function with parameters already?