Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

Better service support in JDL #127

Closed
agoncal opened this issue Jun 20, 2017 · 3 comments
Closed

Better service support in JDL #127

agoncal opened this issue Jun 20, 2017 · 3 comments

Comments

@agoncal
Copy link

agoncal commented Jun 20, 2017

At the moment we can generate a service or not with a single line in the JDL :

service Proposal with serviceClass

It would be good to be able to add method signature to generate methods. With a simple grammar and focusing on defaults.

service Proposal with serviceClass {
  method1(String),                   // public void method1(String param1)
  method2(String s),                 // public void method2(String s)
  String method3(Integer, Integer),  // public String method3(Integer param1, Integer param2)
  private MyEntity method4(Integer)  // private MyEntity method4(Integer param1)
}

This would create the same methods as today (save, findAll, findOne, delete) as well as creating the demanded methods.

@MathieuAA
Copy link
Member

MathieuAA commented Jun 20, 2017

@agoncal for this to happen, the generator must be updated (templates, JS files) to accept this kind of input. As for the JDL (parsing, exporting, etc.), it would be quite easy to do.
@jdubois what do you think?

@hakandilek
Copy link

I think it would better be discussed together with jhipster/generator-jhipster#6275.

@agoncal
Copy link
Author

agoncal commented Aug 25, 2017

Closing and referencing this issue on Enriching the JDL grammar #6275

@agoncal agoncal closed this as completed Aug 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants