Skip to content

Commit

Permalink
addrssed all comment
Browse files Browse the repository at this point in the history
Signed-off-by: Junwei Dai <[email protected]>
  • Loading branch information
Junwei Dai committed Nov 1, 2024
1 parent 96bcd36 commit 0c73128
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-api-consistency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Daily API Consistency Test
on:
schedule:
- cron: '0 8 * * *' # Runs daily at 8 AM UTC
workflow_dispatch:

jobs:
API-consistency-test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.opensearch.flowframework.exception.ApiSpecParseException;
import org.opensearch.rest.RestRequest;

import java.util.HashSet;
import java.util.List;

import io.swagger.v3.oas.models.OpenAPI;
Expand Down Expand Up @@ -81,7 +80,7 @@ public static boolean compareRequiredFields(List<String> requiredEnumParams, Str

List<String> requiredApiParams = schema.getRequired();
if (requiredApiParams != null && !requiredApiParams.isEmpty()) {
return new HashSet<>(requiredEnumParams).containsAll(new HashSet<>(requiredApiParams));
return requiredApiParams.stream().allMatch(requiredEnumParams::contains);
}
}
return false;
Expand Down

0 comments on commit 0c73128

Please sign in to comment.