From f5f9a7e091a35a8d64db05f38336f3d1c24e4b5c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 4 Oct 2023 15:59:12 +0800 Subject: [PATCH] Update tests for maven plugins (#16720) * Fix swagger-annotations groupId in java examples In Version 5.4.0 OpenApi-Generator has replaced the legacy library which provided the `io.swagger.annotations.*` namespace (hosted at https://mvnrepository.com/artifact/io.swagger/swagger-annotations) with the updated project that provides `io.swagger.v3.oas.annotations.*`. Hence, if you want to use OpenApi-Generator >= 5.4.0 you need this package https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations which is now reflected in these example files. * Raise jackson-databind-nullable version in example to latest v0.2.6 * Update springfox dependency to v3.x in java examples See https://github.com/springfox/springfox#migrating-from-existing-2x-version * fix maven plugin spring tests --------- Co-authored-by: Philzen --- .../examples/java-client.xml | 6 +- .../examples/spring.xml | 249 +++++++++--------- 2 files changed, 130 insertions(+), 125 deletions(-) diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index fcb7c1aafb8..a55bceb48fb 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -94,7 +94,7 @@ - io.swagger + io.swagger.core.v3 swagger-annotations ${swagger-annotations-version} @@ -191,11 +191,11 @@ UTF-8 - 1.6.3 + 2.2.16 2.35 2.13.0 2.13.0 - 0.2.1 + 0.2.6 1.3.5 4.13.2 8.3.1 diff --git a/modules/openapi-generator-maven-plugin/examples/spring.xml b/modules/openapi-generator-maven-plugin/examples/spring.xml index 6cabd0c50c2..ec85bdc97f8 100644 --- a/modules/openapi-generator-maven-plugin/examples/spring.xml +++ b/modules/openapi-generator-maven-plugin/examples/spring.xml @@ -1,130 +1,135 @@ - 4.0.0 - org.openapitools - sample-project - jar - 1.0-SNAPSHOT - sample-project - https://maven.apache.org + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + org.openapitools + sample-project + jar + 1.0-SNAPSHOT + sample-project + https://maven.apache.org - - org.springframework.boot - spring-boot-starter-parent - 2.7.6 - - - - - - org.openapitools - openapi-generator-maven-plugin - - 7.1.0-SNAPSHOT - - - - spring-server - - generate - - - - ${project.basedir}/swagger.yaml + + org.springframework.boot + spring-boot-starter-parent + 2.7.6 + + + + + + org.openapitools + openapi-generator-maven-plugin + + 7.1.0-SNAPSHOT + + + + spring-server + + generate + + + + ${project.basedir}/swagger.yaml - - spring + + spring - + - - - springfox - true - true - + + + springfox + true + true + - - + + - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - none - - - - - - - - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - - - - - io.swagger - swagger-annotations - ${swagger-annotations-version} - - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.data - spring-data-commons - - - - io.springfox - springfox-swagger2 - ${springfox-version} - - - io.springfox - springfox-swagger-ui - ${springfox-version} - - - javax.xml.bind - jaxb-api - 2.2.11 - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - - - org.openapitools - jackson-databind-nullable - 0.1.0 - - - - javax.validation - validation-api - - - - - 1.5.8 - 2.8.0 - + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 1.8 + 1.8 + none + + + + + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + io.springfox + springfox-swagger2 + ${springfox.version} + + + org.webjars + swagger-ui + ${swagger-ui.version} + + + org.webjars + webjars-locator-core + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.6 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + org.springframework.boot + spring-boot-starter-test + test + + + + 2.9.2 + 4.15.5 +