Bug Report Checklist
Description
With the new version 7.11.0 of the openapi-generator, a @Nullable annotation was introduced in the SpringCodegen.java from org.springframework.lang
Since we are using the JavaCamelServerCodegen.java in our Quarkus project, which extends the SpringCodegen.java, these annotations are introduced in our generated pojo's, causing a compilation failure.
openapi-generator version
7.11.0
Generation Details
Example of generation. The @Nullable is only added to non-required attributes.
@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen", date = "2025-02-03T10:45:30.354153+01:00[Europe/Madrid]", comments = "Generator version: 7.11.0")
public class Pojo {
private String name;
private String code;
private @Nullable String attr1;
private @Nullable String attr2;
Related issues/PRs
This is related with the PR merged recently:
1742b93#diff-9de34b4aad5de707e8aa0c031f20a6573f8f50826a437f0652c54b3788b37d41
Coming from issue: #17382
Suggest a fix
We propose to switch to a more neutral annotation like jakarta.annotation.Nullable which is compatible across frameworks.
Bug Report Checklist
Description
With the new version
7.11.0of theopenapi-generator, a@Nullableannotation was introduced in theSpringCodegen.javafromorg.springframework.langSince we are using the
JavaCamelServerCodegen.javain ourQuarkusproject, which extends theSpringCodegen.java, these annotations are introduced in our generated pojo's, causing a compilation failure.openapi-generator version
7.11.0
Generation Details
Example of generation. The
@Nullableis only added to non-required attributes.Related issues/PRs
This is related with the PR merged recently:
1742b93#diff-9de34b4aad5de707e8aa0c031f20a6573f8f50826a437f0652c54b3788b37d41
Coming from issue: #17382
Suggest a fix
We propose to switch to a more neutral annotation like
jakarta.annotation.Nullablewhich is compatible across frameworks.