diff --git a/.github/workflows/test-framework-v3-springboot4.yml b/.github/workflows/test-framework-v3-springboot4.yml
new file mode 100644
index 00000000000..743f103f739
--- /dev/null
+++ b/.github/workflows/test-framework-v3-springboot4.yml
@@ -0,0 +1,181 @@
+name: Test Framework V3 Springboot4 (Spring Boot 4 / Jackson 3)
+
+on:
+ # execute on demand
+ workflow_dispatch:
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 11 ]
+
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ ref: 3.0.0
+ - uses: actions/setup-java@v6
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mkdir codegen-cli
+ echo "BUILDING 3.0.0"
+ mvn -version
+ mvn -q -B package -DskipTests -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3
+ cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v7
+ with:
+ name: codegen-cli
+ path: codegen-cli
+ - name: upload test files
+ uses: actions/upload-artifact@v7
+ with:
+ name: spring-custom-test-files
+ path: samples/custom-tests/spring/v3/springboot4
+
+ generate:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 21 ]
+
+
+ outputs:
+ generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
+
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ ref: 3.0.0
+ - uses: actions/setup-java@v6
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v8
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: spring
+ job-name: ${{ env.JOB_NAME }}
+ spec-url: https://raw.githubusercontent.com/swagger-api/swagger-codegen/3.0.0/modules/swagger-codegen/src/test/resources/3_0_0/petstore-with-issue-cases.yaml
+ options: "--library spring-boot4"
+ - id: outcome
+ run: |
+ echo "generate_outcome=${{ steps.generate.outcome }}" >> $GITHUB_OUTPUT
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v7
+ with:
+ name: ${{ env.JOB_NAME }}generate_outcome
+ path: generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate logs
+ uses: actions/upload-artifact@v7
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v7
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: ${{ steps.generate.outputs.path }}
+ env:
+ JOB_NAME: "springboot4-v3-sample"
+
+ build:
+
+ needs: generate
+ if: contains(needs.generate.outputs.generate_outcome, 'success')
+ runs-on: ubuntu-latest
+
+ strategy:
+ ###############################################
+ ##### DYNAMIC: Dependent on build environment
+ ###############################################
+ matrix:
+ java-version: [17, 21]
+ ###############################################
+ ##### END DYNAMIC: Dependent on build environment
+ ###############################################
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ ref: 3.0.0
+ - name: Download artifacts
+ uses: actions/download-artifact@v8
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v8
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ ###############################################
+ ##### DYNAMIC: Dependent on build environment
+ ###############################################
+ - name: Set up JDK ${{ matrix.java-version }}
+ uses: actions/setup-java@v6
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java-version }}
+ ###############################################
+ ##### END DYNAMIC: Dependent on build environment
+ ###############################################
+ - name: Download Java Test Files
+ uses: actions/download-artifact@v8
+ with:
+ name: spring-custom-test-files
+ path: spring-custom-test-files
+ - name: setup test files
+ id: test-files
+ run: |
+ echo "adding test directories path"
+
+ mkdir -p generated/${{ env.JOB_NAME }}/src/test/java/io/swagger/api
+
+ echo "copying custom test files"
+ cp spring-custom-test-files/PetApiTest.java generated/${{ env.JOB_NAME }}/src/test/java/io/swagger/api/
+ cp spring-custom-test-files/StoreApiTest.java generated/${{ env.JOB_NAME }}/src/test/java/io/swagger/api/
+ cp spring-custom-test-files/UserApiTest.java generated/${{ env.JOB_NAME }}/src/test/java/io/swagger/api/
+
+ - name: build
+ id: build
+ uses: ./.github/actions/build
+ continue-on-error: true
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ build-commands: "mvn clean package -Dmaven.compiler.release=${{ matrix.java-version }} -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3"
+ - id: outcome
+ run: |
+ echo "build_outcome=${{ steps.build.outcome }}" >> $GITHUB_OUTPUT
+ echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
+ - name: upload build outcome
+ uses: actions/upload-artifact@v7
+ with:
+ name: ${{ env.JOB_NAME }}build_outcome-java${{ matrix.java-version }}
+ path: ${{ env.JOB_NAME }}build_outcome
+ - name: upload logs
+ uses: actions/upload-artifact@v7
+ with:
+ name: ${{ env.JOB_NAME }}logs-java${{ matrix.java-version }}
+ path: ${{ steps.build.outputs.logs }}
+ env:
+ JOB_NAME: "springboot4-v3-sample"
diff --git a/bin/springboot4-petstore-server.sh b/bin/springboot4-petstore-server.sh
new file mode 100755
index 00000000000..263f9c8b447
--- /dev/null
+++ b/bin/springboot4-petstore-server.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=`dirname "$SCRIPT"`/..
+ APP_DIR=`cd "${APP_DIR}"; pwd`
+fi
+
+executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn clean package
+fi
+
+output="samples/server/petstore/springboot-4"
+# if you've executed sbt assembly previously it will use that instead.
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -Dlogback.configurationFile=bin/logback.xml"
+ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore.yaml -l spring --library spring-boot4 -o $output -DhideGenerationTimestamp=true"
+
+echo "Removing files and folders under samples/server/petstore/springboot-4/src/main"
+rm -rf samples/server/petstore/springboot-4/src/main
+rm -rf samples/server/petstore/springboot-4/src/gen
+find samples/server/petstore/springboot-4 -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
+java $JAVA_OPTS -jar $executable $ags
+
+#cd $output
+#mvn package
diff --git a/pom.docker.xml b/pom.docker.xml
index c1bb1b921a1..33baf26b47a 100644
--- a/pom.docker.xml
+++ b/pom.docker.xml
@@ -137,7 +137,6 @@
1.8
UTF-8
1g
- ${javadoc.package.exclude}
-Xdoclint:none
@@ -832,9 +831,13 @@
org.apache.maven.plugins
maven-jxr-plugin
3.6.0
-
- true
-
+
+
+
+ aggregate
+
+
+
org.apache.maven.plugins
@@ -1004,7 +1007,7 @@
8
- 1.0.63
+ 1.0.64-SNAPSHOT
2.2.55
1.6.16
2.1.48
diff --git a/pom.xml b/pom.xml
index 59a6ce15dd3..f550fc2b906 100644
--- a/pom.xml
+++ b/pom.xml
@@ -139,7 +139,6 @@
1.8
UTF-8
1g
- ${javadoc.package.exclude}
-Xdoclint:none
@@ -898,9 +897,13 @@
org.apache.maven.plugins
maven-jxr-plugin
3.6.0
-
- true
-
+
+
+
+ aggregate
+
+
+
org.apache.maven.plugins
@@ -1070,7 +1073,7 @@
8
- 1.0.63
+ 1.0.64-SNAPSHOT
2.2.56
1.6.17
2.1.49
diff --git a/samples/custom-tests/spring/v3/springboot4/PetApiTest.java b/samples/custom-tests/spring/v3/springboot4/PetApiTest.java
new file mode 100644
index 00000000000..2a15b7b8e5f
--- /dev/null
+++ b/samples/custom-tests/spring/v3/springboot4/PetApiTest.java
@@ -0,0 +1,80 @@
+package io.swagger.api;
+
+import io.swagger.model.ModelApiResponse;
+import io.swagger.model.Pet;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.Arrays;
+import java.util.List;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+@SpringBootTest
+public class PetApiTest {
+
+ @Autowired
+ private PetApi api;
+
+ @Test
+ public void addPetTest() throws Exception {
+ Pet body = new Pet()
+ .id(789L)
+ .name("doggie")
+ .status(Pet.StatusEnum.AVAILABLE);
+ ResponseEntity responseEntity = api.addPet(body);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, responseEntity.getStatusCode());
+ }
+
+ @Test
+ public void deletePetTest() throws Exception {
+ Long petId = 789L;
+ String apiKey = "apiKey_example";
+ ResponseEntity responseEntity = api.deletePet(petId, apiKey);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, responseEntity.getStatusCode());
+ }
+
+ @Test
+ public void findPetsByStatusTest() throws Exception {
+ String status = "available";
+ ResponseEntity> responseEntity = api.findPetsByStatus(status);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, responseEntity.getStatusCode());
+ }
+
+ @Test
+ public void findPetsByTagsTest() throws Exception {
+ List tags = Arrays.asList("tags_example");
+ ResponseEntity> responseEntity = api.findPetsByTags(tags);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, responseEntity.getStatusCode());
+ }
+
+ @Test
+ public void getPetByIdTest() throws Exception {
+ Long petId = 789L;
+ ResponseEntity responseEntity = api.getPetById(petId);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, responseEntity.getStatusCode());
+ }
+
+ @Test
+ public void updatePetTest() throws Exception {
+ Pet body = new Pet()
+ .id(789L)
+ .name("doggie")
+ .status(Pet.StatusEnum.AVAILABLE);
+ ResponseEntity responseEntity = api.updatePet(body);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, responseEntity.getStatusCode());
+ }
+
+ @Test
+ public void uploadFileTest() throws Exception {
+ Long petId = 789L;
+ String additionalMetadata = "additionalMetadata_example";
+ org.springframework.web.multipart.MultipartFile body = null;
+ ResponseEntity responseEntity = api.uploadFile(petId, additionalMetadata, body);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, responseEntity.getStatusCode());
+ }
+
+}
diff --git a/samples/custom-tests/spring/v3/springboot4/StoreApiTest.java b/samples/custom-tests/spring/v3/springboot4/StoreApiTest.java
new file mode 100644
index 00000000000..1df599e4c82
--- /dev/null
+++ b/samples/custom-tests/spring/v3/springboot4/StoreApiTest.java
@@ -0,0 +1,47 @@
+package io.swagger.api;
+
+import io.swagger.model.Order;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+@SpringBootTest
+public class StoreApiTest {
+
+ @Autowired
+ private StoreApi api;
+
+ @Test
+ public void deleteOrderTest() throws Exception {
+ Long orderId = 789L;
+ ResponseEntity responseEntity = api.deleteOrder(orderId);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, responseEntity.getStatusCode());
+ }
+
+ @Test
+ public void getInventoryTest() throws Exception {
+ ResponseEntity