Closed yelhouti closed 5 years ago
What happened to the package-lock.json
file? :)
You forgot to export them in the JSON files, for that I suggest having something like that:
{
"blueprintOptions": {
"blueprintName": {
"theAnswer": 42
}
}
Why the blueprintName
? because there could be more than one enabled blueprint in one project.
What happened to the
package-lock.json
file? :)
nothing on purpose XD
You forgot to export them in the JSON files, for that I suggest having something like that:
@MathieuAA Indeed I when I tried to use it with the generator this afternoon, I couldn't they don't get exported. working on it. I wouldn't even tell the blueprint, they can use whatever they want, I'll just add it like this:
{
"name": "Customer",
"fields": [
{
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required"
],
"id": true
},
],
"relationships": [
{
"relationshipType": "one-to-many",
"otherEntityName": "task",
"otherEntityRelationshipName": "customer",
"relationshipName": "task",
"id": true
}
],
...
}
....
for a jdl like this:
entity Customer {
@id
name String required
}
relationship OneToMany {
@id
Customer{task} to Task{customer(name) required}
}
...
@MathieuAA and BIG thank you for making multiple blueprints a thing, was going to be my next thing to do
EDIT: I guess I won't be able to store id
next to the other options as doing so would make it VERY ugly to reconstruct jdl/jdl_entity... from the .json file, I will settle for "options": ["id": true]
@MathieuAA annotations today are suppose to be before the javadoc, do you mind me moving them after this is a BREAKING CHANGE
@MathieuAA you can review and merge if you have time, thanks a lot :)
Please don't introduce breaking changes. As we can't make a major release for generator
On Tue, 16 Jul 2019, 5:24 am yelhouti, notifications@github.com wrote:
@MathieuAA https://github.com/MathieuAA you can review and merge if you have time, thanks a lot :)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jhipster/jhipster-core/pull/349?email_source=notifications&email_token=AAIOKFZRFLRXSPIZBTPYWA3P7U5P5A5CNFSM4IDOYJ4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ7SOPA#issuecomment-511649596, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIOKF5WK2KEQ7DZJL7OYSDP7U5P5ANCNFSM4IDOYJ4A .
thanks for your ansewer @deepu105 , glad I didn't, maybe we can keep switching comments and annotations for another PR, if you (all of you) are ok with it.
@yelhouti there's just one pending comment, and the jdl-core.min.js that needs an update
IMO this file should not even be versioned, it changes on each compilation, but I can recompile whenever you are ready
It changes if the grammar changes, and is needed for web projects that depend on JCore (the JDL studio). If you think of a better workflow, I'd be more than happy to hear it!!
other porject having jdl-core as a dependency should be enough no?
How so? I don't get your question
How so? I don't get your question
gitter?
yep
Awesome!!! 👍 Thanks @yelhouti
This seems really cool ! Would it be possible to update the docs to explain what can be done, and how to use this ?
@murdos my pleasure @clement26695 as soon as it is released, this mainly useful for blueprints, in my use case I used it for composite ids: https://www.npmjs.com/package/generator-jhipster-composite-key-server https://www.npmjs.com/package/generator-jhipster-primeng-blueprint
Removed checks for unknown options (kept them for built-in ones) Added related tests had to change how option
useJPADerivedIdentifier
is used internally, in the JDL it's just:jpaDerivedIdentifier
which is a PITA. one of these should be deprecated, once json files are removed and we keep only JDL, remove all references of:useJPADerivedIdentifier
Fix #320
Please make sure the below checklist is followed for Pull Requests.