Skip to content

Commit 9a49b94

Browse files
authored
Disable validation instead of failing (multiple spec files) (#9)
1 parent 0d6001e commit 9a49b94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

openapi-validation-core/src/main/java/com/getyourguide/openapi/validation/core/OpenApiInteractionValidatorFactory.java

+6
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ private MultipleSpecOpenApiInteractionValidatorWrapper buildMultipleSpecOpenApiI
6060
})
6161
.filter(Objects::nonNull)
6262
.collect(Collectors.toList());
63+
64+
if (validators.isEmpty()) {
65+
log.info("OpenAPI spec file(s) could not be found [validation disabled]");
66+
return null;
67+
}
68+
6369
return new MultipleSpecOpenApiInteractionValidatorWrapper(validators);
6470
}
6571

0 commit comments

Comments
 (0)