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
For some strange reason I can't get lombok support working. After running the archetype I've changed the pom according to the wiki. And I added @Getter and @Setter to both Persona.class and Name.class and removed all getter and setter methods. After running maven the parameters are no longer shown in the Json nor xml datatypes. They are also no longer present in swagger.
I also tried the jackson2-api-lombok example. This works out of the box (tag v2.7.0) but I noticed the getter and setter methods in for example Name.class and Person.class are still present. After removing these (in the case of Person only for id) these are also no longer present in the docs. What am I missing here?
@peter-janssen, I'm not seeing the problem. When I remove the getId and setId methods on Person in the jackson2-api-lombok, the property still shows up.
See this patch.
If you can provide more details about what you're seeing, let's open a new issue to track it.
As requested I opened a new issue. I did some further investigation it seems that when the annotations @Getter and @Setter are on the class level they do not work. @Data does work though. See this patch
I had a look at your code and there should probably be a check in the LombokMethodGenerator. The methods shouldGenerateGetters and shouldGenerateSetters check for @Getter and @Setter respectively on the field and for @Data on the class (decoratedTypeElement). There should be check for @Getter and @Setter on the class as well.
Something like:
For now I will probably fallback to the pre 2.7.0 way. After some discussion with colleagues this seems to be the better way of going about this anyway. As for @markozi's comment on #182. This should probably be solved in the lombok project. As far as I can see this has already been addressed in projectlombok/lombok#132 and projectlombok/lombok#170.
The text was updated successfully, but these errors were encountered:
Original question on #182
reply by @stoicflame
As requested I opened a new issue. I did some further investigation it seems that when the annotations
@Getter
and@Setter
are on the class level they do not work.@Data
does work though. See this patchI had a look at your code and there should probably be a check in the LombokMethodGenerator. The methods shouldGenerateGetters and shouldGenerateSetters check for
@Getter
and@Setter
respectively on the field and for@Data
on the class (decoratedTypeElement). There should be check for@Getter
and@Setter
on the class as well.Something like:
For now I will probably fallback to the pre 2.7.0 way. After some discussion with colleagues this seems to be the better way of going about this anyway. As for @markozi's comment on #182. This should probably be solved in the lombok project. As far as I can see this has already been addressed in projectlombok/lombok#132 and projectlombok/lombok#170.
The text was updated successfully, but these errors were encountered: