Skip to content

Commit

Permalink
Merge 7602ae3 into 4ee7500
Browse files Browse the repository at this point in the history
  • Loading branch information
kakulisen committed Sep 10, 2019
2 parents 4ee7500 + 7602ae3 commit 6a87bca
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -45,6 +45,8 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.Path;

public class DefaultContractsGenerator implements ContractsGenerator {

private static Logger LOGGER = LoggerFactory.getLogger(DefaultContractsGenerator.class);
Expand Down Expand Up @@ -131,7 +133,8 @@ public void generate() throws RuntimeException {
String swaggerString = SwaggerUtils.swaggerToString(generator.generate());

File outputFile = new File(
outputDir + File.separator + loadClass.getSimpleName() + contractfileType.getFileSuffix());
outputDir + File.separator + loadClass.getSimpleName() + contractfileType
.getFileSuffix());

if (!outputFile.exists()) {
if (!outputFile.getParentFile().exists()) {
Expand Down Expand Up @@ -176,6 +179,10 @@ private static boolean canProcess(Class<?> loadClass) {
return true;
}

Path pathAnnotation = loadClass.getAnnotation(Path.class);
if (pathAnnotation != null) {
return true;
}
return false;
}

Expand Down

0 comments on commit 6a87bca

Please sign in to comment.