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

Different validation rules in CLI and JDL-studio #462

Closed mmuruev closed 4 years ago

mmuruev commented 4 years ago

I can create an app with baseName gateway-app from CLI but with JDL-studio this is impossible trow error (- is forbidden) also minor differences with VC-Code

MathieuAA commented 4 years ago

Hello there. I'm gonna transfer this issue in JCore as it concerns the JDL. @colameo just so you know

MathieuAA commented 4 years ago

I'm gonna review the rules ASAP. Thanks for bringing that up and sorry for the inconvenience!

mmuruev commented 4 years ago
❯ jh import-jdl jhipster-jdl.jh
INFO! Using JHipster version installed globally
00h00m00s 0/0: : INFO! Executing import-jdl jhipster-jdl.jh
INFO! Options: from-cli: true, inline:
error: Error message:
The baseName property name must match: /^[A-Za-z][A-Za-z0-9_]*$/, got customer-gateway.
at line: 3, column: 14
Error during import-jdl: Error: The baseName property name must match: /^[A-Za-z][A-Za-z0-9_]*$/, got customer-gateway.
at line: 3, column: 14
SyntaxError: Error: The baseName property name must match: /^[A-Za-z][A-Za-z0-9_]*$/, got customer-gateway.
at line: 3, column: 14
at callApiMethod (/home/mf/.nvm/versions/node/v13.12.0/lib/node_modules/generator-jhipster/node_modules/jhipster-core/lib/readers/jdl_reader.js:99:11)
at parse (/home/mf/.nvm/versions/node/v13.12.0/lib/node_modules/generator-jhipster/node_modules/jhipster-core/lib/readers/jdl_reader.js:83:10)

Now JDL studio is ok with this but importer are broken

MathieuAA commented 4 years ago

Dashes are forbidden both in this repo and the generator. The issue comes from the JDL studio which isn't up-to-date. The issue should go there

MathieuAA commented 4 years ago

Similar to https://github.com/jhipster/jdl-studio/issues/85. I'll try to address this issue today