jdl-studio icon indicating copy to clipboard operation
jdl-studio copied to clipboard

looks like only the parse picks it up in the rnhipster call.. ? as it seems valid, in real-time in the JDL studio - prior to download

Open johnda98 opened this issue 2 years ago • 5 comments

not sure if the JDL studio checks for reserved words prior to download and parse Screen Shot 2021-11-08 at 9 25 46 AM

johnda98 avatar Nov 08 '21 16:11 johnda98

Please provide steps to reproduce this issue.

mraible avatar Nov 08 '21 16:11 mraible

I had to prefix the entity Account with Plant.. see pics.. JDL studio seemed to tell me it was ok with 'Account' as entity name.. then dloaded and moved jdl to backend and ran rnhipster jdl from the client referencing the jdl in the backend.

sooooo rnhipster jdl ran and parsed and complained about the word Account

of course jdl studio may intend for reasons to not check for reserved word usage,, thats fine.. all coolio.

of course I have upper case in the App properties for 'React' and postgres... which the JDL studio didnt tell me the parser would complain about.. thats trivial.. quick edit.. but studio could check on those properties.

just a fyi.. no biggy Screen Shot 2021-11-08 at 10 21 11 AM

Screen Shot 2021-11-08 at 10 31 15 AM

johnda98 avatar Nov 08 '21 17:11 johnda98

Can you please include your JDL?

mraible avatar Nov 08 '21 17:11 mraible

below is the correction to pass the rnhipster jdl parser. the original simply had the word 'Account' not 'PlantAccount' and of course I had 'React' and 'Postgres' not full lower case.. and the JDL studio didnt flag the caps on those.

still learning jdl of course.

cheers.

application { config { baseName Plantbackend, applicationType monolith, packageName com.plantidote.plantapi, authenticationType jwt, prodDatabaseType postgresql, clientFramework react } entities * }

entity PlantAccount { accountid String required
profilesmartcontractid String required }

entity Accounttype { accounttype String required
}

entity Preferences { preferenceid String required
}

entity Datapermissions{ coretoplatform Boolean required noncoretoplatform Boolean required opennessmeasure Integer required
}

relationship OneToMany { Accounttype{Account(accountid)} to PlantAccount{Accounttype(accounttype)} PlantAccount{Preferences(preferenceid)} to Preferences{Account(accountid)} PlantAccount to Datapermissions

}

enum Language { ENGLISH, SPANISH }

dto PlantAccount, Accounttype, Preferences, Datapermissions with mapstruct service PlantAccount, Accounttype, Preferences, Datapermissions with serviceClass paginate PlantAccount with infinite-scroll paginate PlantAccount with pagination

johnda98 avatar Nov 08 '21 17:11 johnda98

arhhh.. the jdl should not include the application config IF im just importing new entities after a initial app gen.. this aspect is not truly specific to this issue though

johnda98 avatar Nov 09 '21 15:11 johnda98