From 9ee5d3fccd558f584a1af55c8f4544f10b8a1410 Mon Sep 17 00:00:00 2001 From: "Allen D. Ball" Date: Sat, 24 Jul 2021 01:28:54 -0700 Subject: [PATCH 01/10] Added support for arguments of JAR URLs. E.g., jar:jar-specific-uri!/spec.yml. --- .../codegen/plugin/CodeGenMojo.java | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index f7f1af538c84..5a49b28aef25 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -662,7 +662,13 @@ public void execute() throws MojoExecutionException { } if (isNotEmpty(inputSpec)) { - configurator.setInputSpec(inputSpec); + URL url = inputSpecRemoteUrl(); + + if ((! inputSpecFile.exists()) && url != null) { + configurator.setInputSpec(url.toString()); + } else { + configurator.setInputSpec(inputSpec); + } } if (isNotEmpty(gitHost)) { @@ -1078,12 +1084,17 @@ private String calculateInputSpecHash(File inputSpecFile) throws IOException { * Try to parse inputSpec setting string into URL * @return A valid URL or null if inputSpec is not a valid URL */ - private URL inputSpecRemoteUrl(){ - try { - return new URI(inputSpec).toURL(); - } catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) { - return null; + private URL inputSpecRemoteUrl() { + URL url = getClass().getClassLoader().getResource(inputSpec); + + if (url == null) { + try { + url = new URI(inputSpec).toURL(); + } catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) { + } } + + return url; } /** From 742c20356b4794b840389b4481b6aef9f880a7eb Mon Sep 17 00:00:00 2001 From: "Allen D. Ball" Date: Sat, 24 Jul 2021 11:20:42 -0700 Subject: [PATCH 02/10] Resolve and search COMPILE dependencies for inputSpec resource. --- .../codegen/plugin/CodeGenMojo.java | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 5a49b28aef25..df0c0ca530d6 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -32,6 +32,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.net.URLClassLoader; import java.net.URLConnection; import java.nio.channels.Channels; import java.nio.channels.FileChannel; @@ -39,6 +40,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.text.MessageFormat; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -51,13 +53,15 @@ import io.swagger.v3.parser.util.ClasspathHelper; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; @@ -82,7 +86,7 @@ * Goal which generates client/server code from a OpenAPI json/yaml definition. */ @SuppressWarnings({"unused", "MismatchedQueryAndUpdateOfCollection"}) -@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true) +@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true) public class CodeGenMojo extends AbstractMojo { private final Logger LOGGER = LoggerFactory.getLogger(CodeGenMojo.class); @@ -1081,11 +1085,11 @@ private String calculateInputSpecHash(File inputSpecFile) throws IOException { } /** - * Try to parse inputSpec setting string into URL + * Try to parse inputSpec setting string into URL (truly remote or resource) * @return A valid URL or null if inputSpec is not a valid URL */ private URL inputSpecRemoteUrl() { - URL url = getClass().getClassLoader().getResource(inputSpec); + URL url = dependencyClassLoader().getResource(inputSpec); if (url == null) { try { @@ -1097,6 +1101,21 @@ private URL inputSpecRemoteUrl() { return url; } + private ClassLoader dependencyClassLoader() { + List list = new ArrayList<>(); + + for (Artifact artifact : project.getArtifacts()) { + try { + if (artifact.isResolved() && artifact.getType().equals("jar")) { + list.add(new URL("jar:" + artifact.getFile().toURI() + "!/")); + } + } catch (Exception e) { + } + } + + return new URLClassLoader(list.toArray(new URL[] { }), getClass().getClassLoader()); + } + /** * Get specification hash file * @param inputSpecFile - Openapi specification input file to calculate its hash. From 53dd19ffe52e0c19c42fb5ead61c4f39036c9755 Mon Sep 17 00:00:00 2001 From: "Allen D. Ball" Date: Sat, 24 Jul 2021 16:38:52 -0700 Subject: [PATCH 03/10] Added test cases for openapi-generator-maven-plugin:generate input specifications: * URLs of the form jar:jar-specific-uri!/spec.yaml * Resources on the compilation classpath in addition to the existing FILE test case. --- .../openapi-generator-maven-plugin/pom.xml | 6 ++ .../codegen/plugin/CodeGenMojoTest.java | 57 +++++++++++++----- .../local-repo/petstore/schema/1/schema-1.jar | Bin 0 -> 3503 bytes .../local-repo/petstore/schema/1/schema-1.pom | 9 +++ .../petstore/schema/maven-metadata-local.xml | 12 ++++ .../src/test/resources/default/pom.xml | 33 +++++++++- .../src/test/resources/default/settings.xml | 11 ++++ .../{ => src/main/resources}/petstore.yaml | 0 .../main/resources}/schemas/Category.yaml | 0 .../main/resources}/schemas/Order.yaml | 0 .../{ => src/main/resources}/schemas/Pet.yaml | 0 .../{ => src/main/resources}/schemas/Tag.yaml | 0 .../main/resources}/schemas/User.yaml | 0 13 files changed, 109 insertions(+), 19 deletions(-) create mode 100644 modules/openapi-generator-maven-plugin/src/test/resources/default/local-repo/petstore/schema/1/schema-1.jar create mode 100644 modules/openapi-generator-maven-plugin/src/test/resources/default/local-repo/petstore/schema/1/schema-1.pom create mode 100644 modules/openapi-generator-maven-plugin/src/test/resources/default/local-repo/petstore/schema/maven-metadata-local.xml create mode 100644 modules/openapi-generator-maven-plugin/src/test/resources/default/settings.xml rename modules/openapi-generator-maven-plugin/src/test/resources/default/{ => src/main/resources}/petstore.yaml (100%) rename modules/openapi-generator-maven-plugin/src/test/resources/default/{ => src/main/resources}/schemas/Category.yaml (100%) rename modules/openapi-generator-maven-plugin/src/test/resources/default/{ => src/main/resources}/schemas/Order.yaml (100%) rename modules/openapi-generator-maven-plugin/src/test/resources/default/{ => src/main/resources}/schemas/Pet.yaml (100%) rename modules/openapi-generator-maven-plugin/src/test/resources/default/{ => src/main/resources}/schemas/Tag.yaml (100%) rename modules/openapi-generator-maven-plugin/src/test/resources/default/{ => src/main/resources}/schemas/User.yaml (100%) diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 708c506dff91..4c2b8d99f3af 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -64,6 +64,12 @@ ${junit.version} test + + org.apache.maven + maven-resolver-provider + 3.9.4 + test + org.apache.maven.shared maven-verifier diff --git a/modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java b/modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java index 89dc94c4300a..4ad01d0f5eb9 100644 --- a/modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java +++ b/modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java @@ -37,7 +37,11 @@ import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuilder; import org.apache.maven.project.ProjectBuildingRequest; +import org.apache.maven.repository.internal.MavenRepositorySystemUtils; import org.eclipse.aether.DefaultRepositorySystemSession; +import org.eclipse.aether.impl.DefaultServiceLocator; +import org.eclipse.aether.repository.LocalRepository; +import org.eclipse.aether.RepositorySystem; public class CodeGenMojoTest extends BaseTestCase { @Override @@ -45,10 +49,22 @@ protected void setUp() throws Exception { super.setUp(); } + public void testCommonConfigurationWithFileInputSpec() throws Exception { + testCommonConfiguration("file"); + } + + public void testCommonConfigurationWithResourceInputSpec() throws Exception { + testCommonConfiguration("resource"); + } + + public void testCommonConfigurationWithURLInputSpec() throws Exception { + testCommonConfiguration("url"); + } + @SuppressWarnings("unchecked") - public void testCommonConfiguration() throws Exception { + private void testCommonConfiguration(String profile) throws Exception { File folder = Files.createTempDirectory("test").toFile(); - CodeGenMojo mojo = loadMojo(folder, "src/test/resources/default"); + CodeGenMojo mojo = loadMojo(folder, "src/test/resources/default", profile); mojo.execute(); assertEquals("java", getVariableValueFromObject(mojo, "generatorName")); assertEquals("jersey2", getVariableValueFromObject(mojo, "library")); @@ -65,7 +81,7 @@ public void testCommonConfiguration() throws Exception { public void testHashGenerationFileContainsExecutionId() throws Exception { // GIVEN Path folder = Files.createTempDirectory("test"); - CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "executionId"); + CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "file", "executionId"); // WHEN mojo.execute(); @@ -86,7 +102,7 @@ public void testSkipRegenerationForClasspathSpecFileNoChange() throws Exception //GIVEN /* Setup the mojo */ final Path folder = Files.createTempDirectory("test-classpath"); - final CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/classpath", "executionId"); + final CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/classpath", null, "executionId"); /* Perform an initial generation */ mojo.execute(); @@ -124,7 +140,7 @@ public void testSkipRegenerationForClasspathSpecFileWithChange() throws Exceptio //GIVEN /* Setup the mojo */ final Path folder = Files.createTempDirectory("test-classpath"); - final CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/classpath", "executionId"); + final CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/classpath", null, "executionId"); /* Perform an initial generation */ mojo.execute(); @@ -159,7 +175,7 @@ public void testSkipRegenerationForClasspathSpecFileWithChange() throws Exceptio public void testCollapsedSpecProduced() throws Exception { // GIVEN Path folder = Files.createTempDirectory("test"); - CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "executionId"); + CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "file", "executionId"); // WHEN mojo.execute(); @@ -172,7 +188,7 @@ public void testCollapsedSpecProduced() throws Exception { public void testCollapsedSpecAddedToArtifacts() throws Exception { // GIVEN Path folder = Files.createTempDirectory("test"); - CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "executionId"); + CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "file", "executionId"); // WHEN mojo.execute(); @@ -187,7 +203,7 @@ public void testCollapsedSpecAddedToArtifacts() throws Exception { public void testAnyInputSpecMustBeProvided() throws Exception { // GIVEN Path folder = Files.createTempDirectory("test"); - CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "executionId"); + CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "file", "executionId"); mojo.inputSpec = null; mojo.inputSpecRootDirectory = null; @@ -201,7 +217,7 @@ public void testAnyInputSpecMustBeProvided() throws Exception { public void testInputSpecRootDirectoryDoesNotRequireInputSpec() throws Exception { // GIVEN Path folder = Files.createTempDirectory("test"); - CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "executionId"); + CodeGenMojo mojo = loadMojo(folder.toFile(), "src/test/resources/default", "file", "executionId"); mojo.inputSpec = null; mojo.inputSpecRootDirectory = "src/test/resources/default"; @@ -214,14 +230,14 @@ public void testInputSpecRootDirectoryDoesNotRequireInputSpec() throws Exception assertTrue(hashFolder.resolve("_merged_spec.yaml-executionId.sha256").toFile().exists()); } - protected CodeGenMojo loadMojo(File temporaryFolder, String projectRoot) throws Exception { - return loadMojo(temporaryFolder, projectRoot, "default"); + protected CodeGenMojo loadMojo(File temporaryFolder, String projectRoot, String profile) throws Exception { + return loadMojo(temporaryFolder, projectRoot, profile, "default"); } - protected CodeGenMojo loadMojo(File temporaryFolder, String projectRoot, String executionId) throws Exception { + protected CodeGenMojo loadMojo(File temporaryFolder, String projectRoot, String profile, String executionId) throws Exception { File file = new File(projectRoot); FileUtils.copyDirectory(file, temporaryFolder); - MavenProject project = readMavenProject(temporaryFolder); + MavenProject project = readMavenProject(temporaryFolder, profile); MavenSession session = newMavenSession(project); MojoExecution execution = newMojoExecution("generate"); MojoExecution executionWithId = copyWithExecutionId(executionId, execution); @@ -234,15 +250,24 @@ private MojoExecution copyWithExecutionId(String executionId, MojoExecution exec return executionWithId; } - protected MavenProject readMavenProject(File basedir) + protected MavenProject readMavenProject(File basedir, String profile) throws Exception { File pom = new File(basedir, "pom.xml"); + LocalRepository localRepo = new LocalRepository(new File(basedir, "local-repo")); + DefaultServiceLocator locator = MavenRepositorySystemUtils.newServiceLocator(); + RepositorySystem system = locator.getService(RepositorySystem.class); + DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession(); + session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo)); MavenExecutionRequest request = new DefaultMavenExecutionRequest(); request.setBaseDirectory(basedir); + if (profile != null) { + request.addActiveProfile(profile); + } ProjectBuildingRequest configuration = request.getProjectBuildingRequest(); - configuration.setRepositorySession(new DefaultRepositorySystemSession()); + configuration.setRepositorySession(session); + configuration.setResolveDependencies(true); MavenProject project = lookup(ProjectBuilder.class).build(pom, configuration).getProject(); assertNotNull(project); return project; } -} \ No newline at end of file +} diff --git a/modules/openapi-generator-maven-plugin/src/test/resources/default/local-repo/petstore/schema/1/schema-1.jar b/modules/openapi-generator-maven-plugin/src/test/resources/default/local-repo/petstore/schema/1/schema-1.jar new file mode 100644 index 0000000000000000000000000000000000000000..5b4d1c0860f71e8456a2b3dfba7ccb2a5bed0bac GIT binary patch literal 3503 zcmZ{ncQhQ@7RDz!(T!fB8*NA!l8D}!5!^v^q7$9yj510_88xEENc0{x45AxGM2{fR zTaZW)ae499d-vwPwcdBuS^J!|_qX@{_ouH*NCX6sk&yum15XVBzlj_`1c0f-mBqF7 zG$bxY002UOzAh=*RRzI+%Jl!Q8ThN>FEdP8Pg_I%4>%a6aReL1L3PE!6I8n5BKXnq zMnlOdsgLVEU>%s4Hf+Mbf`}q}n{|s-#QFBiHRg;{=8}z|wm`S9K3{yU{d;^*W4gHf zujcoD-M`1n*&P34cdB1mF9$zgKTjVAaFDJ0qt6^}o(s3XhJ+JGnk#i%x(m64bO+U5 zZ`BTQd(=Xevu5?WGb`0O*SyoXWF-*w^FUU0M?E3UK@M+Mt1=-NN*UK1MB3SL0_(Y@_I2lQw1S@sfDbiYpT=l`!(;>x zY);Y}T_S0}oqlk5Ze!O3*CJ$rB$U6liME5J!-segVBETo)-=L4V^nkA?`E)+e9-sf zb4ENH*#4s&X&PSYjcc8f0r7az2T>(|;u5mW7%TO1H677|C*^od`JT)umIbD`NZMVBkRDX%4qHe?uW6c0T-@Ea+G@UMm_QDB3-A^zl%& zxlhj@?xiDe3=!iHa!c~@d%2XYKQ1TAEd=eOd)HzycSqr#--xxFqE=tu4XBF}*p?Jb$I#>X^{oY0BwM%MsO8N4|U!QB%BVh z?Jlu$PcC#xFUutm7Pe2vHQ?gyItpU|n>0xo4SuIn$MrcXS8+y{6ZY#|YVW zz2q*H;HzywxXZ39;YC6S?#bG8;N~#&KozYyDrWlra*pZfZ9~YV=(0PO?9h_b)CZee zK!BuW+%R%da4RH7p(WGonO;1fO~+j(ySdnPdsr};P=Df)lB-ylNQ_&;O}CZY8q4;; z%cLS^C9OfKN;SqszI4e+ml4pg;Y@d9RkA!9o07x>Mm}$POW%|r`{8whRwe}D_CpFv zsw5RbZqqk{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y6tnJE-9Lt}yPwveNc4PD~h3xgz&6-s3wke(DZ ztwp}5Jmt!Kr$fux-V88K@W>MWp+ZFrzo+ib(Eq(vRXHrHD|(xU9NA*%ot*@-LvZl$ z9g6l9#IMbK6AZUpGOLlxgAFBGr`nuwORugop{QhRr!4n0+Ci^#hq+lSaYU5q0!0nC zw~b@Q0RF0p{P~_JDD&q?h;DPiMXbpBCgcv` zf&T36#s=d-!N;XLPes35i%4>ib45SNnX)%}mELL4t#^o6q)MVU=JTwzo!;^vB;-i| z5Sb7DNpr<0KS~&bcCG^er#e@VaE$;6_$T80mtU?B=b!qES+0QRf33f>#}(lGtt%q= q%laGc{NCY;QGQ?Sic$Vn$FJu + + 4.0.0 + petstore + schema + 1 + POM was created from install:install-file + diff --git a/modules/openapi-generator-maven-plugin/src/test/resources/default/local-repo/petstore/schema/maven-metadata-local.xml b/modules/openapi-generator-maven-plugin/src/test/resources/default/local-repo/petstore/schema/maven-metadata-local.xml new file mode 100644 index 000000000000..d66c798366f3 --- /dev/null +++ b/modules/openapi-generator-maven-plugin/src/test/resources/default/local-repo/petstore/schema/maven-metadata-local.xml @@ -0,0 +1,12 @@ + + + petstore + schema + + 1 + + 1 + + 20210724220722 + + diff --git a/modules/openapi-generator-maven-plugin/src/test/resources/default/pom.xml b/modules/openapi-generator-maven-plugin/src/test/resources/default/pom.xml index a2b3a7b26f6d..67a74ce37457 100644 --- a/modules/openapi-generator-maven-plugin/src/test/resources/default/pom.xml +++ b/modules/openapi-generator-maven-plugin/src/test/resources/default/pom.xml @@ -1,5 +1,5 @@ + jar:file:${project.basedir}/../src/test/resources/default/local-repo/petstore/schema/1/schema-1.jar!/petstore.yaml + + + java + + + + + + joda + + + + jersey2 + + From 01dd879d04d3ddcac181203a7c86c4bf30c427e3 Mon Sep 17 00:00:00 2001 From: parenko Date: Mon, 20 May 2024 11:49:27 +0200 Subject: [PATCH 08/10] Comment not required anymore Was introduced with #7587 could be removed with #10544 --- modules/openapi-generator-maven-plugin/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 4c2b8d99f3af..632f2d3c6026 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -16,7 +16,6 @@ UTF-8 **/src/main/java/org/openapitools/codegen/plugin/**/* - From 003d054bcf201e980a1a509dc54442bac976e9dd Mon Sep 17 00:00:00 2001 From: parenko Date: Mon, 20 May 2024 11:53:22 +0200 Subject: [PATCH 09/10] referenced same maven version these artifacts are referenced by same ${project.version} in https://github.com/apache/maven/blob/master/pom.xml --- modules/openapi-generator-maven-plugin/pom.xml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 632f2d3c6026..a261f6e771ec 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -16,6 +16,7 @@ UTF-8 **/src/main/java/org/openapitools/codegen/plugin/**/* + 3.9.4 @@ -26,25 +27,25 @@ org.apache.maven maven-core - 3.9.4 + ${maven.version} provided org.apache.maven maven-artifact - 3.9.4 + ${maven.version} provided org.apache.maven maven-compat - 3.9.4 + ${maven.version} test org.apache.maven maven-plugin-api - 3.9.4 + ${maven.version} provided @@ -66,7 +67,7 @@ org.apache.maven maven-resolver-provider - 3.9.4 + ${maven.version} test From 0ad61f79adf976fe876d5d215105316ebeb318b5 Mon Sep 17 00:00:00 2001 From: parenko Date: Mon, 20 May 2024 12:07:26 +0200 Subject: [PATCH 10/10] updating maven dependencies to 3.9.6 --- modules/openapi-generator-maven-plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index a261f6e771ec..2609980037ce 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -16,7 +16,7 @@ UTF-8 **/src/main/java/org/openapitools/codegen/plugin/**/* - 3.9.4 + 3.9.6