Open
Description
Description
Prior to #4074, all generated *ServiceImpl and *ServiceFactory classes would never be overwritten due to io.swagger.codegen.languages.AbstractJavaJAXRSServerCodegen#shouldOverwrite
which was removed in the previously mentioned issue. I believe that the previous behavior was correct because those classes are intended to contain user-written code and are also written to a different directory than the rest of the generated classes. There's no reason to allow them to be overwritten and this change breaks anyone that relied on this.
Swagger-codegen version
2.2.2-SNAPSHOT
Swagger declaration file content or url
Command line used for generation
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.2-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/api.yml</inputSpec>
<language>jaxrs</language>
<output>${project.basedir}</output>
<modelPackage>com.foo.model</modelPackage>
<apiPackage>com.foo.api</apiPackage>
<configOptions>
<dateLibrary>java8</dateLibrary>
<sourceFolder>src/generated/java</sourceFolder>
</configOptions>
<environmentVariables>
<hideGenerationTimestamp/>
<models/>
<apis/>
<supportingFiles>
ApiException.java,ApiOriginFilter.java,ApiResponseMessage.java,JacksonJsonProvider.java,NotFoundException.java,StringUtil.java,RFC3339DateFormat.java
</supportingFiles>
</environmentVariables>
<addCompileSourceRoot>false</addCompileSourceRoot>
</configuration>
</execution>
</executions>
</plugin>