Hello, I want to use my own Date (MyDate) implementation instead of java.util.date or yodatime or someting like that. Therefore I use the switches --type-mappings and --import-mappings during server side code generation (Jax-RS). The generated code is ok but it does not work out of the box, because during serialization/deserialization MyDate is unknown. For MyDate parameters I use a ParamConverterProvider with Provider annotation, that converts a String in MyDate. It works and I don't have to manipulate the generated code. The other way, when I MyDate is used in models, it is a liitle bit more complicated. For that, I wrote a StdSerializer which serialize MyDate into JSON. But to make this work I have to annotate every MyDate attribute in the models with JsonSerialize using my Serializer. This is a pitty because every time, when code is re-generated or some new attributes of type MyDate are added, I have to place the JsonSerialize annotation. Is there another possibility to serialize MyDate? Or can I configure the generation to annotate the MyDate attributes themself?
Thanks. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
