Skip to content

Conversation

@norrs
Copy link

@norrs norrs commented Apr 16, 2020

I didn't notice any example for how to quickly get started with org.immutables together with mapstruct, so here a rather simple example.

@JsonDeserialize(builder = ApiPerson.Builder.class)
@ExampleStyle
public interface ApiPerson {
String getId();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish we didn't need getters here on the immutables, and we could have stayed with fluent getters, but mapstruct requires POJOs with getters I believe.

The builders however supports the fluent setters.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Immutables is able to support this. This is from Immutables documentation:
"No annotations are required on abstract accessor methods in order for them to become attributes."

https://immutables.github.io/immutable.html#overview

Can we modify the ImmutablesAccessorNamingStrategy to support abstract accessors to qualify as getters.

@norrs
Copy link
Author

norrs commented Apr 17, 2020

Related to #65

@norrs
Copy link
Author

norrs commented Sep 16, 2020

If anyone wants to continue on this PR to fix an example, they are free to do so. I think #80 (comment) is probably the correct way of doing it. So if someone knows, please just go a head and update. :) (cc @vijaysingh0507 )

@fabricio-ecore
Copy link

fabricio-ecore commented Oct 28, 2021

you have not merged yet =(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants