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:
Paul Parenko
2024-07-09 10:37:54 +02:00
committed by GitHub
parent 039f0b85f6
commit 5612852fb6
14 changed files with 938 additions and 44 deletions

View File

@@ -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>