Skip to content

Commit 13c77f0

Browse files
committed
set useJakartaEe for jersey3, generate samples
1 parent b456067 commit 13c77f0

14 files changed

Lines changed: 12 additions & 13 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ public void processOpts() {
606606
// The flag below should be set for all Java libraries, but the templates need to be ported
607607
// one by one for each library.
608608
supportsAdditionalPropertiesWithComposedSchema = true;
609+
setUseJakartaEe(true);
609610
applyJakartaPackage();
610611
} else if (libNative) {
611612
supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java"));

samples/client/others/java/jersey2-oneOf-Mixed/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ public Entity<?> serialize(Object obj, Map<String, Object> formParams, String co
800800
return entity;
801801
}
802802

803-
/**
803+
/**
804804
* Adds the object with the provided key to the MultiPart.
805805
* Based on the object type sets Content-Disposition and Content-Type.
806806
*

samples/client/others/java/jersey2-oneOf-duplicates/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ public Entity<?> serialize(Object obj, Map<String, Object> formParams, String co
800800
return entity;
801801
}
802802

803-
/**
803+
/**
804804
* Adds the object with the provided key to the MultiPart.
805805
* Based on the object type sets Content-Disposition and Content-Type.
806806
*

samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ public Entity<?> serialize(Object obj, Map<String, Object> formParams, String co
941941
return entity;
942942
}
943943

944-
/**
944+
/**
945945
* Adds the object with the provided key to the MultiPart.
946946
* Based on the object type sets Content-Disposition and Content-Type.
947947
*

samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ public Entity<?> serialize(Object obj, Map<String, Object> formParams, String co
941941
return entity;
942942
}
943943

944-
/**
944+
/**
945945
* Adds the object with the provided key to the MultiPart.
946946
* Based on the object type sets Content-Disposition and Content-Type.
947947
*

samples/client/petstore/java/jersey3-oneOf/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ dependencies {
121121
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
122122
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
123123
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
124-
125124
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
126125
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
127126
}

samples/client/petstore/java/jersey3-oneOf/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> query
11421142
protected Client buildHttpClient() {
11431143
// Create ClientConfig if it has not been initialized yet
11441144
if (clientConfig == null) {
1145-
clientConfig = getDefaultClientConfig();
1145+
clientConfig = getDefaultClientConfig();
11461146
}
11471147

11481148
ClientBuilder clientBuilder = ClientBuilder.newBuilder();

samples/client/petstore/java/jersey3/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ dependencies {
129129
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
130130
implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version"
131131
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
132-
133132
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
134133
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
135134
}

samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> query
13811381
protected Client buildHttpClient() {
13821382
// Create ClientConfig if it has not been initialized yet
13831383
if (clientConfig == null) {
1384-
clientConfig = getDefaultClientConfig();
1384+
clientConfig = getDefaultClientConfig();
13851385
}
13861386

13871387
ClientBuilder clientBuilder = ClientBuilder.newBuilder();

samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ public Entity<?> serialize(Object obj, Map<String, Object> formParams, String co
849849
return entity;
850850
}
851851

852-
/**
852+
/**
853853
* Adds the object with the provided key to the MultiPart.
854854
* Based on the object type sets Content-Disposition and Content-Type.
855855
*

0 commit comments

Comments
 (0)