Generator-jhipster: Microservice entity generation behavior

Created on 18 Apr 2020  路  9Comments  路  Source: jhipster/generator-jhipster

Overview of the feature request

following a discussion https://github.com/jhipster/jhipster-core/issues/426 maybe a good enhancement for v7.

Sample JDL

Let's take the current jdl as an example

application {
  config {
    baseName ms
    applicationType microservice
  }
  entities TestA
}

application {
  config {
    baseName gw
    applicationType gateway
  }
  entities TestA
}

entity TestA (testA) {
    id Long
    title String required
}

microservice TestA with ms
Current behavior

If we generate it with the current behavior, this code will generate:

  • Entity backend code in the 'ms'
  • Entity backend code in the 'gw'

  • Frontend code calling 'ms' endpoints in the 'gw'

Expected behavior
  • Also frontend code calling 'gw' endpoints in the 'gw' :-)
Motivation for or Use Case

The backend code is generated perfectly: this is totally what's expected.
But unfortunately we do not have the ability to call all these wonderful endpoints :-).

  • [ ] Checking this box is mandatory (this is just to show you read everything)
area JDL microservice

All 9 comments

@Tcharl : I don't understand the bug label here. Is there a real bug here ? Or more an improvement ?
cc @MathieuAA

I think it's a two-in-one. There is a bug, yes?

Hi @pascalgrimaud , hi @MathieuAA

I may not have been clear enough, sorry for that: I didn't have to mention the feature request of jhi-core to explain the issue.

With the JDL in example, jhipster is generating the backend code in the gateway (rest endpoints and entities), but not the frontend code that is able to call it.

I do not think it is a feature to be able to consume CRUD endpoints that have been generated without explicitly mentioning it, am I wrong?

Or I may misundertand jdl syntax, which is also something to take into consideration :-).

You're not misunderstanding :)

@MathieuAA @Tcharl : what is the state of this ticket ? Is there a real bug or not ?

It's an enhancement/discussion about the use of keywords in some contexts. It's the next thing in my todo list after the e2e tests.

@MathieuAA It's been a year or two since May 30 (or at least it feels like it). Any updates?

Not really, there's always something coming and I don't have as much time as before :(

@MathieuAA That's fair. I'll close it.

@Tcharl If you have a PR to fix, please re-open.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pascalgrimaud picture pascalgrimaud  路  3Comments

Steven-Garcia picture Steven-Garcia  路  3Comments

frantzynicolas picture frantzynicolas  路  3Comments

edvjacek picture edvjacek  路  3Comments

kaidohallik picture kaidohallik  路  3Comments