-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Options generation annotations on entities #26007
Comments
Hello everyone, while I don't doubt it's doable right now, there may first have to be a design phase so as to make the necessary adjustments to the parsing system, then another change in the generator. To sum up, to bind every annotation to a specific generation, my opinion is that one has to: make a change to the parsing system to acknowledge said change, wire it to the generator with an explicit mapping (we leave the parsing system to enter the generator system, this gate matters), and then read the output of this mapping to generate what's wanted. |
I think We currently have support for |
Hi @mshima , wasn't aware about this concept, totally make sense! Deny vs allowFirst question: do you know if the current supported annotations are operationally used or beta? According to RFC, reasonable default should be used if nothing is specified, otherwise any annotation superseeds default. Thus, specifying
would be equals to
Meaning that the DSLFor the model vs entity, I definitely love the idea for a different reason. From what I understand, there's a decoupling between the model (description of the class, logical layer) and the entity which is the real instance of the class. Let's illustrate pseudocoding:
Any remark? Agrees? What about a spec defining getall, getone, update and create for each option (no real idea about a proper syntax) |
This issue is stale because it has been open for too long without any activity. |
Please keep opened |
Issue check: JHipster has completed the sample check
This check uses |
Overview of the feature request
The goal would be to add some jdl annotations and cli options on entities.
The goal would be to split annotations into two categories: layer ones vs C-R-U-D ones.
-- Frontend --
@Form
would generate frontend forms@FrontConsumer
would generate client-side consumer no matter the consumption strategy-- Controllers --
@Controller(types=Rest)
would expose api@Controller(types=Sse)
would expose streaming (listeners and senders)@Consumer(types=Stream[<entitytopic>])
would Consume message via streams (data coming from other microservice)-- Services --
@Consumer(types=Rest[<toApplication>/<toEntity>])
would call the target service api instead of repository in the service implementation.@Consumerr(types=Stream[<topics>])
would hook service.save() and send messages in the topics instead of using repositories@Consumer(types=SQL)
would use usual spring data providers-- C-R-U-D --
Same logic to be applied to methods (create:update/patch/get/delete), decorelated to layers.
--- summing up
As such, 'reasonable default' as per Inclusive property rfc would be:
and for crud:
And to let user be more precise by combining both (overriding class-level choices):
Motivation for or Use Case
The goal would be to provide much more control on entities generation
The ultimate goal being to provide a versatile solution for complex applications with few effort from the end user (plumbery jhipster-managed), i.e.
I want to contribute to this feature, however, seems huge so need some workforce help + bounties please (to motivate other contributors)!
@qmonmert @mshima @mraible @MathieuAA wdyt ?
The text was updated successfully, but these errors were encountered: