jhipster / jhipster-core

JHipster Domain Language, used by JHipster UML and JDL-Studio to generate entities
Apache License 2.0
346 stars 116 forks source link

JDL should add 'generator-jhipster' prefix to blueprints. #468

Closed mshima closed 4 years ago

mshima commented 4 years ago
Overview of the issue

Blueprints jdl options should allow blueprints [vuejs] value. To keep consistency with cli jhipster --blueprints vuejs.

And all blueprints should be merged unique by name.

Motivation for or Use Case
Reproduce the error

blueprints [vuejs] creates

blueprints: {
  name: 'vuejs'
}

at .yo-rc.json.

Should be

blueprints: {
  name: 'generator-jhipster-vuejs'
}
Related issues
Suggest a Fix
JHipster Version(s)
JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
MathieuAA commented 4 years ago

Two comments later: I've finally re-read the issue (sorry, I shouldn't ever read issues in the morning). Okay

mshima commented 4 years ago

Thanks @MathieuAA. About merging with .yo-rc.json existing values unique by name? It's too difficult?

Currently it's overriding .yo-rc.json values.

MathieuAA commented 4 years ago

Quite easy I guess. Can't do it today though

mshima commented 4 years ago

@MathieuAA no problem.

MathieuAA commented 4 years ago

@mshima didn't think about it yesterday: why would we merge?

mshima commented 4 years ago

@MathieuAA do you think we should force to set update the jdl too?

jhipster import-jdl foo-with-kotlin --blueprints vuejs
jhipster import-jdl foo-updated-with-kotlin

The second jhipster import-jdl will remove the vuejs blueprint and create angular files with the existing vuejs files. Seems right to me to don't require the user to add vuejs to jdl or adding the cli option when regenerating.

MathieuAA commented 4 years ago

It's simple. We should remove the --blueprints option. Anything that can be overridden by JDL "code" shouldn't be an option.

MathieuAA commented 4 years ago

Again, I don't get why we should merge... There should be precedence rules.

mshima commented 4 years ago

I am thinking about https://github.com/jhipster/generator-jhipster/pull/11770. So jhipster jdl https://github.com/jhipster/jdl-samples/blob/master/library.jh --blueprints vuejs should export the jdl once the import is done.

MathieuAA commented 4 years ago

Again, I don't think it's a good idea to provide blueprints from the CLI instead of providing them from the JDL file.

mshima commented 4 years ago

This is related to kickstarting a sample application with user customised options. https://groups.google.com/d/msg/jhipster-dev/UaV6pQwmYFQ/XGgnkS3aCAAJ

Just forget about this.