我想使用 swagger-codegen maven 插件为我的 API 生成 JAX-RS 服务器存根,但我想使用我自己的服务实现类,而不是生成的那个。有没有办法生成除此类之外的所有内容?对于我的 API,该工具会生成四个 API 类:ProfilesApi、ProfilesApiService、ProfilesApiServiceFactory 和 ProfilesApiServiceImpl。
我当前的 Maven 配置:
<configuration>
<inputSpec>src/main/resources/Profile.json</inputSpec>
<language>jaxrs</language>
<configOptions>
<dateLibrary>java8</dateLibrary>
</configOptions>
<models>Profile,PageInformation,ProfileResult</models>
<modelPackage>com.myApp.profile-api-model</modelPackage>
<apiPackage>com.myApp.profile-api-webapp</apiPackage>
<library>jersey2</library>
<environmentVariables>
<!-- change default client library (here until plugin 2.1.5). Doesn't seem to work! -->
<library>jersey2</library>
<!-- generate all models -->
<models></models>
<!-- generate all APIs -->
<apis></apis>
<!-- generate just the supporting files that are Java source code (not project build files) -->
<supportingFiles>ApiException.java,ApiOriginFilter.java,ApiResponseMessage.java,JacksonJsonProvider.java,LocalDateProvider.java,LocalDateTimeProvider.java,NotFoundException.java,StringUtil.java,web.xml,ProfilesApi.java,ProfilesApiService.java,ProfilesApiServiceFactory.java</supportingFiles>
</environmentVariables>
</configuration>