Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export annotations #24277

Merged
merged 2 commits into from
Nov 19, 2023
Merged

Conversation

mshima
Copy link
Member

@mshima mshima commented Nov 18, 2023

  • move annotations a separate object to don’t mixup with other fields.
  • move changelogDate to that annotation object

Maybe changelogDate should be kept at root and exported like an annotation as an exception.

Fixes #24262


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mshima mshima changed the title Export annotationS Export annotations Nov 18, 2023
@DanielFran
Copy link
Member

DanielFran commented Nov 18, 2023

@mshima when it export to jdl, it gives preference to annotations or not?

I mean if we have:

  • dto mapstruct: it will export as dto mapstruct or @dto(mapstruct)?
  • @dto(mapstruct): it will export as dto mapstruct or @dto(mapstruct)?

@mshima
Copy link
Member Author

mshima commented Nov 18, 2023

@DanielFran import/export is reproducible (order and presentation can change).

@ChangelogDate(123)
@Dto(custom)
entity A

dto A with mapstruct

Will become

@ChangelogDate("123")
@Dto("custom")
entity A

dto A with mapstruct

At generation time the annotation will override the option.
So dto custom will be used.

@mshima
Copy link
Member Author

mshima commented Nov 18, 2023

The old behavior is to mix annotations and options.
I don’t know which takes precedence.

annotations are exported as options if the annotation is an official option, ignored otherwise.

@DanielFran DanielFran merged commit f1705f2 into jhipster:main Nov 19, 2023
48 checks passed
@mshima mshima deleted the skip_ci-jdl-export-annotations branch November 19, 2023 23:50
@deepu105 deepu105 added this to the 8.1.0 milestone Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JDL exporting should export annotations.
3 participants