You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if it's possible, but it would be nice if we could use custom decoders so that the field names in our case classes weren't tied to the attributes they represent in the json. For example:
caseclassCat(a: String, b: Int)
implicitvaldecoder:Decoder[Cat] =Decoder.forProduct2("the_a", "the_b")(Cat.apply)
println(JsonSchema.deriveFor[Cat].asJson.pretty(Printer.spaces2))
// {// "type" : "object",// "required" : [// "a", <--- should be the_a// "b" <--- should be the_b// ],// "properties" : {// "a" : {// "type" : "string"// },// "b" : {// "type" : "integer",// "format" : "int32"// }// }// }
The text was updated successfully, but these errors were encountered:
Not sure if it's possible, but it would be nice if we could use custom decoders so that the field names in our case classes weren't tied to the attributes they represent in the json. For example:
The text was updated successfully, but these errors were encountered: