phoenixnap / springmvc-raml-plugin

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.
Apache License 2.0
136 stars 84 forks source link

Set @JsonProperty in generated POJOs for proper serialization #258

Closed yuranos closed 6 years ago

yuranos commented 6 years ago

For some of our external providers we need to be able to retail property names that contain special characters like dots. For example: "payment.method" : "SOME_PAYMENT_METHOD"

For that to work, we want to add a configuration flag called retainPropertyName, for example and add @JsonProperty to POJOs based on that. I think there's something similar for Enums at the moment.

@stojsavljevic, please let me know if you have any concerns or there's another way to do it.

@vpashynskyi is already working on it.

VolodymyrPashynskyi commented 6 years ago

@stojsavljevic, could you please provide me access to push branch with the fix of the issue

stojsavljevic commented 6 years ago

@vpashynskyi No :) You need to fork the repo and then you create a PR from there.

I already talked to @yuranos about this task. We don't need a configuration flag. We can just go and add @JsonProperty every time Java name is different but raml name of property.

Another thing, in case that you have some doubts, let's discuss them here before you do some work.

Thanks.