Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for https://immutables.github.io/ #481

Open
VaclavPokorny opened this issue Aug 23, 2016 · 4 comments
Open

Support for https://immutables.github.io/ #481

VaclavPokorny opened this issue Aug 23, 2016 · 4 comments

Comments

@VaclavPokorny
Copy link

I'd like to request a few modifications for better integration of Immutables library https://immutables.github.io/. It's use case is similiar to project Lombok (discussed in issue #182), but done in more standards compliant manner. You write an interface or abstract class with only getters and the library will generate an implementation. There are two issues In conjunction with enunciate:

  1. Enunciate does not scan interfaces which are arguably more suited for defining value object's interface (less verbose). When abstract class is used, however, everything works as expected.

  2. It would be nice if getter name form could be specified. Like using only "Value value()" instead of forced "Value getValue()" which again makes such interface nicer and less verbose.

@stoicflame
Copy link
Owner

That seems like a reasonable request. I'll designate this as an enhancement request and keep it open to track the work.

Implementation note: I've spent some time investigating the immutables project, and I still can't tell whether it merits its own module or whether the Jackson module can be enhanced to support it.

@VaclavPokorny
Copy link
Author

Thanks.

Well the immutables really just work with enunciate but these two enhancements could make it work nicer. However, I don't think they are really specific to immutables.

The other way around would be to scan the generated code (already solved in issue concerning Lombok) but I think this is a better approach as I have direct controll over the source and I can easily put enunciate-specific annontations to it rather than relying on immutables to generate code that is comprehensible to enunciate.

By the way I tried many projects with similiar goals but this one seems to be the best, so thubs up, great work.

@stoicflame
Copy link
Owner

This enhancement is currently seeking a sponsor. If anybody is willing to sponsor the work, reach out to me and I'd be happy to pick it up.

@stevenschlansker
Copy link
Contributor

stevenschlansker commented Apr 29, 2019

I believe that the latest 2.12.0-SNAPSHOT builds should cover the basic needs for this feature. Instead of attempting to add specific Immutables support, I simply enhanced Enunciate's Jackson support enough to read the Immutables generated Jackson annotations. It's far from done / perfect but it is working fairly well already. @VaclavPokorny you might try out a latest build (or the next release once it happens) and let us know what's still missing :)

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

No branches or pull requests

3 participants