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

DTO classes are generated without javadoc comments and without @Schema #25729

Closed
1 task done
jperezdelafuente opened this issue Apr 3, 2024 · 1 comment · Fixed by #25845
Closed
1 task done

DTO classes are generated without javadoc comments and without @Schema #25729

jperezdelafuente opened this issue Apr 3, 2024 · 1 comment · Fixed by #25845

Comments

@jperezdelafuente
Copy link
Contributor

Overview of the issue

When regenerating the project the package dto are generated without Javadoc comments and without @Schema

In previous versions the attributes appeared like this with required marked as deprecated (SonarLint: Remove this use of "required"; it is deprecated."):

    /**
     * Foo
     */
    @NotNull
    @Size(max = 50)
    @Schema(description = "Foo", required = true)
    private String foo;

Since version 8.2.1 it is generated like this:

    @NotNull
    @Size(max = 50)
    private String foo;

It should be generated like this (with javadoc and @Schema with required not deprecated):

    /**
     * Foo
     */
    @NotNull
    @Size(max = 50)
    @Schema(description = "Foo", requiredMode = Schema.RequiredMode.REQUIRED)
    private String foo;

The package domain are generated with correct Javadoc

Related issues

Domain entities are not generated with javadoc comments #23862
Avoid minor code smell in generated DTO classes #25132

JHipster Version(s)

Release 8.2.1

JHipster configuration
JDL definitions
 application {
  config {
    applicationType monolith,
    baseName foo,
    packageName com.foo,
    jhiPrefix gsr,
    authenticationType session,
    databaseType sql,
    devDatabaseType h2Disk,
    prodDatabaseType oracle,
    enableHibernateCache true,
    cacheProvider ehcache,
    buildTool maven,
    testFrameworks [cypress, gatling, cucumber],
    clientFramework angular,
    enableTranslation true,
    nativeLanguage es,
    languages [es, en]
  }
  entities *
}

/** Entity Foo /
entity Foo(foo) {
/
* Foo */
foo String required maxlength(20)
}

dto * with mapstruct
service all with serviceImpl
paginate all with pagination

  • Checking this box is mandatory (this is just to show you read everything)
@jperezdelafuente jperezdelafuente changed the title DTO classes are not generated with javadoc comments and without @Schema DTO classes are generated without javadoc comments and without @Schema Apr 3, 2024
Copy link
Contributor

github-actions bot commented Apr 11, 2024

JHipster has completed the sample check
.yo-rc.json:
Entities JDL:
Application: successfully generated
Frontend check: skipped
Backend check: skipped
E2E check: skipped

This check uses jhipster info output from the issue description to generate the sample.
Bug report that does not contain this information will be marked as invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants