-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[Java] internal config option to use jakarta or javax package #14310
Merged
+516
−583
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
modules/openapi-generator/src/main/resources/Java/generatedAnnotation.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) | ||
@{{javaxPackage}}.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package {{invokerPackage}}; | ||
|
||
import javax.ws.rs.client.Client; | ||
import javax.ws.rs.client.ClientBuilder; | ||
import javax.ws.rs.client.Entity; | ||
import javax.ws.rs.client.Invocation; | ||
import javax.ws.rs.client.WebTarget; | ||
import javax.ws.rs.core.Form; | ||
import javax.ws.rs.core.GenericType; | ||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.core.Response; | ||
import javax.ws.rs.core.Response.Status; | ||
import {{javaxPackage}}.ws.rs.client.Client; | ||
import {{javaxPackage}}.ws.rs.client.ClientBuilder; | ||
import {{javaxPackage}}.ws.rs.client.Entity; | ||
import {{javaxPackage}}.ws.rs.client.Invocation; | ||
import {{javaxPackage}}.ws.rs.client.WebTarget; | ||
import {{javaxPackage}}.ws.rs.core.Form; | ||
import {{javaxPackage}}.ws.rs.core.GenericType; | ||
import {{javaxPackage}}.ws.rs.core.MediaType; | ||
import {{javaxPackage}}.ws.rs.core.Response; | ||
import {{javaxPackage}}.ws.rs.core.Response.Status; | ||
|
||
{{#hasOAuthMethods}} | ||
import com.github.scribejava.core.model.OAuth2AccessToken; | ||
|
@@ -27,9 +27,9 @@ import java.io.IOException; | |
import java.io.InputStream; | ||
|
||
import java.net.URI; | ||
import javax.net.ssl.SSLContext; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for spotting. I've create PR for fix this #14341 |
||
import javax.net.ssl.TrustManager; | ||
import javax.net.ssl.X509TrustManager; | ||
import {{javaxPackage}}.net.ssl.SSLContext; | ||
import {{javaxPackage}}.net.ssl.TrustManager; | ||
import {{javaxPackage}}.net.ssl.X509TrustManager; | ||
import java.security.cert.X509Certificate; | ||
import java.security.KeyManagementException; | ||
import java.security.NoSuchAlgorithmException; | ||
|
@@ -251,7 +251,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { | |
/** | ||
* <p>Getter for the field <code>httpClient</code>.</p> | ||
* | ||
* @return a {@link javax.ws.rs.client.Client} object. | ||
* @return a {@link {{javaxPackage}}.ws.rs.client.Client} object. | ||
*/ | ||
public Client getHttpClient() { | ||
return httpClient; | ||
|
@@ -260,7 +260,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { | |
/** | ||
* <p>Setter for the field <code>httpClient</code>.</p> | ||
* | ||
* @param httpClient a {@link javax.ws.rs.client.Client} object. | ||
* @param httpClient a {@link {{javaxPackage}}.ws.rs.client.Client} object. | ||
* @return a {@link org.openapitools.client.ApiClient} object. | ||
*/ | ||
public ApiClient setHttpClient(Client httpClient) { | ||
|
@@ -1098,7 +1098,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { | |
/** | ||
* <p>Prepare the file for download from the response.</p> | ||
* | ||
* @param response a {@link javax.ws.rs.core.Response} object. | ||
* @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object. | ||
* @return a {@link java.io.File} object. | ||
* @throws java.io.IOException if any. | ||
*/ | ||
|
@@ -1387,7 +1387,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { | |
* To completely disable certificate validation (at your own risk), you can | ||
* override this method and invoke disableCertificateValidation(clientBuilder). | ||
* | ||
* @param clientBuilder a {@link javax.ws.rs.client.ClientBuilder} object. | ||
* @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object. | ||
*/ | ||
protected void customizeClientBuilder(ClientBuilder clientBuilder) { | ||
// No-op extension point | ||
|
@@ -1399,7 +1399,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { | |
* Please note that trusting all certificates is extremely risky. | ||
* This may be useful in a development environment with self-signed certificates. | ||
* | ||
* @param clientBuilder a {@link javax.ws.rs.client.ClientBuilder} object. | ||
* @param clientBuilder a {@link {{javaxPackage}}.ws.rs.client.ClientBuilder} object. | ||
* @throws java.security.KeyManagementException if any. | ||
* @throws java.security.NoSuchAlgorithmException if any. | ||
*/ | ||
|
@@ -1426,7 +1426,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { | |
/** | ||
* <p>Build the response headers.</p> | ||
* | ||
* @param response a {@link javax.ws.rs.core.Response} object. | ||
* @param response a {@link {{javaxPackage}}.ws.rs.core.Response} object. | ||
* @return a {@link java.util.Map} of response headers. | ||
*/ | ||
protected Map<String, List<String>> buildResponseHeaders(Response response) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
modules/openapi-generator/src/main/resources/Java/libraries/jersey2/anyof_model.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
modules/openapi-generator/src/main/resources/Java/libraries/jersey2/oneof_model.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @OpenAPITools/generator-core-team