Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangoerdes committed Mar 11, 2024
1 parent 654ad78 commit 3a148aa
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ void initializeRuleApiSpecs() {

router.getRuleManager().getRules().stream()
.filter(this::hasOpenAPIInterceptor)
.forEach(rule -> {
Optional.of(getOpenAPIInterceptor(rule)).ifPresent(openAPIInterceptor -> ruleApiSpecs.put(
rule.getName(),
openAPIInterceptor.getApiProxy().apiRecords)
);
});
.forEach(rule -> Optional.of(getOpenAPIInterceptor(rule)).ifPresent(openAPIInterceptor -> ruleApiSpecs.put(
rule.getName(),
openAPIInterceptor.getApiProxy().apiRecords)
));
}

private boolean hasOpenAPIInterceptor(Rule rule) {
Expand Down

0 comments on commit 3a148aa

Please sign in to comment.