-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
Describe the solution you'd like
Currently I have to run separate command for each contract file. Assume I have two contract files user-api.yaml & books-api.yaml. For this two files I have to run separate commands:
openapi-generator-cli generate --input-spec user-api.yaml <...other options...>openapi-generator-cli generate --input-spec books-api.yaml <...other options...>
Instead of this I would like to specify input-directory with my yaml/json contracts
Describe alternatives you've considered
As a work around I use the solution belowe. If you use maven plugin then you can use solution like this
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<id>user-api</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/user-api.yaml</inputSpec>
</configuration>
</execution>
<execution>
<id>books-api</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/books-api.yaml</inputSpec>
</configuration>
</execution>
</executions>
<configuration>
<generatorName>spring</generatorName>
<configOptions>
<library>spring-mvc</library>
</configOptions>
</configuration>
</plugin>
so for each contract file I have to specify separate execution phase which is not great and developer-friendly solution
Reactions are currently unavailable