因此,openapi生成器maven插件将所有api规范生成为一个大接口。我当时想拆分界面。
我尝试过将标签放入openapi.yaml规范文件中,但没有用
这是配置
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi.generator.version}</version>
<executions>
<execution>
<id>generate-impl-api</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/openapi.yaml</inputSpec>
<generatorName>jaxrs-spec</generatorName>
<generateApis>true</generateApis>
<generateApiDocumentation>true</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<generateModels>true</generateModels>
<generateSupportingFiles>true</generateSupportingFiles>
<modelPackage>...</modelPackage>
<apiPackage>...</apiPackage>
<invokerPackage>...</invokerPackage>
<languageSpecificPrimitives>Response</languageSpecificPrimitives>
<importMappings>
<importMapping>Response=Response</importMapping>
</importMappings>
<configOptions>
<implFolder>src/main/java</implFolder>
<sourceFolder>src/main/java</sourceFolder>
<interfaceOnly>true</interfaceOnly>
<java8>true</java8>
<dateLibrary>java8</dateLibrary>
<delegatePattern>false</delegatePattern>
<useTags>true</useTags>
<useBeanValidation>true</useBeanValidation>
</configOptions>
</configuration>
</execution>
<execution>
<id>generate-api-docs</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/openapi.yaml</inputSpec>
<generatorName>html</generatorName>
<output>../docs</output>
</configuration>
</execution>
</executions>
</plugin>