Open eamell opened 4 years ago
I met this problem, In my case the decision was to add
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<executions>
<execution>
<configuration>
<inputSpec>${project.basedir}\src\main\resources\schema\cod.json</inputSpec>
<language>spring</language>
<library>spring-cloud</library>
<output>${project.build.directory}\generated-sources\</output>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<generateSupportingFiles>false</generateSupportingFiles>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<generateSupportingFiles>false</generateSupportingFiles>
<apiPackage>${base-package}.client.cod.api</apiPackage>
<modelPackage>${base-package}.client.cod.model</modelPackage>
<configOptions>
<interfaceOnly>true</interfaceOnly>
<dateLibrary>java8</dateLibrary>
<java8>true</java8>
<defaultInterfaces>false</defaultInterfaces>
<bigDecimalAsString>true</bigDecimalAsString>
<serializableModel>true</serializableModel>
<reactive>false</reactive>
</configOptions>
</configuration>
</execution>
<execution>
<id>limits-client</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}\src\main\resources\schema\Limits_v1.yaml</inputSpec>
<language>spring</language>
<library>spring-cloud</library>
<output>${project.build.directory}\generated-sources\</output>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<generateSupportingFiles>false</generateSupportingFiles>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<generateSupportingFiles>false</generateSupportingFiles>
<apiPackage>${base-package}.client.limits.api</apiPackage>
<modelPackage>${base-package}.client.limits.model</modelPackage>
<configOptions>
<interfaceOnly>true</interfaceOnly>
<dateLibrary>java8</dateLibrary>
<java8>true</java8>
<defaultInterfaces>false</defaultInterfaces>
<bigDecimalAsString>true</bigDecimalAsString>
<serializableModel>true</serializableModel>
<reactive>false</reactive>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
Description
Using version 3 of the Swagger Codegen Maven plugin I am unable to run multiple executions each using a different inputSpec. When I do this I get the following error:
For both executions I have an ID specified and its own configuration as follows:
If I run either one of them without the ID it works, however if I run just one with the ID specified I get the same error. This leads me to believe the issue is more with the ID being specified, however if I leave out the ID I get the following error:
Swagger-codegen version
3.0.13 and 3.0.14
Swagger declaration file content or url
N/A
Command line used for generation
N/A
Steps to reproduce
This assumes two valid OpenAPI YAML or JSON files.
Related issues/PRs
Suggest a fix/enhancement