You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an URL is used as the inputSpecs, the build fails at the very end (all files are generated) with:
INFO] writing file D:\Projects\mdh-gen\mdh-modelgen-test\target\generated-sources\mdh\.openapi-generator-ignore
[INFO] writing file D:\Projects\mdh-gen\mdh-modelgen-test\target\generated-sources\mdh\.openapi-generator\VERSION
[ERROR] D:\Projects\mdh-gen\mdh-modelgen-test\https:\test.com\swagger\spec\mdh.yml [0:0]: unexpected error in Open-API generation
D:\Projects\mdh-gen\mdh-modelgen-test\https:\test.com\swagger\spec\mdh.yml [0:0]: unexpected error in Open-API generation
java.lang.RuntimeException: Could not find https:/test.com/swagger/spec/mdh.yml on the classpath
at io.swagger.v3.parser.util.ClasspathHelper.loadFileFromClasspath (ClasspathHelper.java:31)
at org.openapitools.codegen.plugin.CodeGenMojo.execute (CodeGenMojo.java:706)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
I will have a busy week, so I cannot test it until next week. If the release is coming soon I could test with 4.1.2; that would be much simpler for me :)
Uh oh!
There was an error while loading. Please reload this page.
Description
If an URL is used as the inputSpecs, the build fails at the very end (all files are generated) with:
openapi-generator version
Maven plugin version
OpenAPI declaration file content or url
https://github.com/RockyMM/openapi-modelgen-test/blob/master/src/main/openapi/mdh.yml
Command line used for generation
Steps to reproduce
In the test project above set
inputSpec
to be an URL of a remote file.Run
mvn clean generate-sources
on the test project.Suggest a fix
In the class:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
Seems that
inputSpecFile.exists()
is not doing it's job properly.The text was updated successfully, but these errors were encountered: