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

Export JDL export unwanted values (and create invalid JDL) #356

Closed clementdessoude closed 4 years ago

clementdessoude commented 5 years ago
Overview of the issue

When exporting a JHipster application with the jdl exporter, the jdl seems incorrect as there are some unrecognized values (e.g. packageFolder, promptValues, jhipsterVersion, jwtSecretKey, otherModules and blueprints)

Motivation for or Use Case
Reproduce the error

Create a default jhipster application and try to export it with jhipster export-jdl

Related issues

264 and jhipster/generator-jhipster#8391

344 for the blueprints option

Suggest a Fix

Maybe just ignore the unwanted values ?

JHipster Version(s)

6.2.0 (master) and jhipster-core on master too

JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
MathieuAA commented 5 years ago

Hi, what are the unwanted values and why? They aren't in a .yo-rc anymore?

clementdessoude commented 5 years ago

packageFolder, promptValues, jhipsterVersion, jwtSecretKey, otherModules and blueprints are exported, but not recognized when importing a JDL. These values are stored in the yo-rc file. I am not sure if it is useful to export all of them in the jdl.

Concerning blueprints, it should be handled by #344.

Moreover, promptValues and otherModules are not correctly exported (in the exported jdl, they are printed as [Object])

MathieuAA commented 5 years ago

Is promptValues needed?

clementdessoude commented 5 years ago

I don't think so. I am not sure that the jwtSecretKey is useful too. Concerning the jhipsterVersion, and the packageFolder, I don't know.

MathieuAA commented 5 years ago

From what I've been able to deduce, promptValues can be omitted. About the secret key, I'm not sure. If the JDL export has to perform a perfect export of the app, wouldn't it be needed too? The JHipster version may be useless (unless I'm missing a use case), the packageFolder maybe not: it is asked during the generation. Thanks for the clarification :)

clementdessoude commented 5 years ago

Btw, I can try to make a PR to fix this, if you tell me which fields you want to keep and which ones to drop

murdos commented 5 years ago

The JHipster version may be useless (unless I'm missing a use case),

It's used a least by the upgrade feature.

MathieuAA commented 5 years ago

@clement26695 I'll do it but thanks! Just having this issue is a big step forward.

MathieuAA commented 5 years ago

Only the otherModules key is bothering me... I've dealt with the other (except the package folder, which I'd rather generate from the package name option). This is a tricky one as it contains a name and a version