mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
Fix inputSpec for multi module builds (#7883)
Prefix path to `inputSpec` with maven's `${project.basedir}`. The codegen-maven-plugin will look inside the current working directory so whether a relative path works or not is depending on where the maven build is invoked from. Using `${project.basedir}` makes the path absolute.
This commit is contained in:
parent
ea2474d707
commit
40c30dd2f1
@ -18,7 +18,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>src/main/resources/api.yaml</inputSpec>
|
||||
<inputSpec>${project.basedir}/src/main/resources/api.yaml</inputSpec>
|
||||
<language>java</language>
|
||||
<configOptions>
|
||||
<sourceFolder>src/gen/java/main</sourceFolder>
|
||||
@ -76,7 +76,7 @@ Specifying a custom generator is a bit different. It doesn't support the classpa
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>src/main/resources/yaml/yamlfilename.yaml</inputSpec>
|
||||
<inputSpec>${project.basedir}/src/main/resources/yaml/yamlfilename.yaml</inputSpec>
|
||||
<!-- language file, like e.g. JavaJaxRSCodegen shipped with swagger -->
|
||||
<language>com.my.package.for.GeneratorLanguage</language>
|
||||
<templateDirectory>myTemplateDir</templateDirectory>
|
||||
|
Loading…
x
Reference in New Issue
Block a user