swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Renaming properties with @JsonProperty doesn't work

Open jknova opened this issue 13 years ago • 4 comments

Hi,

I'm using swagger 1.3, and when I rename a property with Jackson's @JsonProperty, it doesn't seem to be picked up by swagger-core.

i.e.

    @JsonProperty("newName")
    private String name = "joe";

Swagger is still using the old name.

jknova avatar Sep 13 '13 22:09 jknova

I wrote a fix in my own repo in the meantime:

jknova/swagger-core@85ee010ced2d18a030b4f9f6f58e36cd8198c50b

jknova avatar Sep 13 '13 22:09 jknova

I am having the same issue with @XmlElement annotations, swagger seems to be ignoring and still using the old name, Looking at your changes it appears to be the same bug.

thepont avatar Sep 25 '13 13:09 thepont

Hi, it's not really a bug, the @JsonProperty annotations are simply not supported in the model processor. I'll look at the enhancement from @jknova shortly

fehguy avatar Sep 25 '13 14:09 fehguy

in next version, full jackson support is enabled.

fehguy avatar Aug 30 '14 05:08 fehguy