我正在使用以下maven插件配置运行Java / resttemplate客户端生成
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.8</version>
<executions>
<execution>
<id>api</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${maven.multiModuleProjectDirectory}/api/target/generated/swagger-api-spec/swagger.json</inputSpec>
<language>java</language>
<library>resttemplate</library>
<modelPackage>com.company.springapi.model</modelPackage>
<apiPackage>com.company.springapi.api</apiPackage>
<invokerPackage>com.company.springapi.invoker</invokerPackage>
<generateSupportingFiles>true</generateSupportingFiles>
<supportingFilesToGenerate>
ApiClient.java,OAuth.java,ApiKeyAuth.java,Authentication.java,HttpBasicAuth.java,RFC3339DateFormat.java
</supportingFilesToGenerate>
<configOptions>
<java8>true</java8>
<dateLibrary>java8</dateLibrary>
<interfaceOnly>true</interfaceOnly>
<groupId>com.company.provider</groupId>
<artifactId>${project.artifactId}</artifactId>
<artifactVersion>${project.version}</artifactVersion>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
,并且它为每个标记的控制器生成单独的TagApi.java文件,例如Tag1Api.java,Tag2Api.java,Tag3Api.java ...(加上ApiClient.java以及支持文件)。
是否有任何方法可以使用swagger-codegen在唯一文件AllTags.java中统一此TagiApi.java类? (我想我是指此模板https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/Java/libraries/resttemplate/api.mustache)
可以使用openapi生成器代替吗? (我认为该模板https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache)