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

[REQ] [JAVA] Jersey3 (client): Make Jakarta Annotation API optional #20575

Open
gcatanese opened this issue Feb 2, 2025 · 0 comments · May be fixed by #20576
Open

[REQ] [JAVA] Jersey3 (client): Make Jakarta Annotation API optional #20575

gcatanese opened this issue Feb 2, 2025 · 0 comments · May be fixed by #20576

Comments

@gcatanese
Copy link
Contributor

The Java Jersey3 client generation generates code that includes the Jakarta Annotation API

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0-SNAPSHOT")
public class FakeApi {
  private ApiClient apiClient;
  ...

However, I might not want to include these annotations, as they require in the pom.xml the jakarta.annotation-api (which I don't necessarily want to add in my application)

<!-- Jakarta Annotation API support -->
<dependency>
     <groupId>jakarta.annotation</groupId>
     <artifactId>jakarta.annotation-api</artifactId>
     <version>${jakarta-annotation-version}</version>
     <scope>provided</scope>
</dependency>

Proposed Improvement

Make the Jakarta Annotation API optional: by default, they are included, however, developers can decide to exclude them during the generation using a new config option.

@gcatanese gcatanese changed the title [REQ] [JAVA} Jersey3 (client): Make Jakarta Annotation API optional [REQ] [JAVA] Jersey3 (client): Make Jakarta Annotation API optional Feb 2, 2025
@gcatanese gcatanese linked a pull request Feb 2, 2025 that will close this issue
5 tasks
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.

1 participant