mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 22:46:13 +00:00
Remove dependency scan for inputSpec (actually not required) (#19084)
* added test with external-ref ("external dependency" installed before actual usage)
* fixed test with resource on classpath
added test with resource on classpath with external-ref.
Test with profile 'resource' was wrong as it took JAR into account, but there was no 'petstore.yaml' on classpath.
* Remove dependency scan and do not modify inputSpec provided by user
It is still possible to provide JARs as inputSpec, however the user has to provide it by hand.
Providing dependencies in plugin section still allows correct inputSpec resolution on classpath.
This commit is contained in:
@@ -27,9 +27,15 @@
|
||||
<artifactId>sample-schema</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>sample-external-ref-schema</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
@@ -48,6 +54,30 @@
|
||||
<dateLibrary>joda</dateLibrary>
|
||||
</configOptions>
|
||||
|
||||
<!-- override the default library to jersey2 -->
|
||||
<library>jersey2</library>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>external-ref</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- specify the OpenAPI spec -->
|
||||
<inputSpec>external-ref/petstore.yaml</inputSpec>
|
||||
|
||||
<!-- target to generate java client code -->
|
||||
<generatorName>java</generatorName>
|
||||
|
||||
<!-- hint: if you want to generate java server code, e.g. based on Spring Boot,
|
||||
you can use the following target: <generatorName>spring</generatorName> -->
|
||||
|
||||
<!-- pass any necessary config options -->
|
||||
<configOptions>
|
||||
<dateLibrary>joda</dateLibrary>
|
||||
</configOptions>
|
||||
|
||||
<!-- override the default library to jersey2 -->
|
||||
<library>jersey2</library>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user