コード例 #1
0
 /** Requests with optional paging require an extra "ds3_paging" member */
 public static ImmutableSet<String> getPaginatedTypes(final Ds3ApiSpec spec) {
   return spec.getRequests()
       .stream()
       .filter(Ds3RequestClassificationUtil::supportsPaginationRequest)
       .map(req -> RequestConverter.getResponseType(req.getDs3ResponseCodes()))
       .collect(GuavaCollectors.immutableSet());
 }
コード例 #2
0
 public static ImmutableList<Request> getAllRequests(
     final Ds3ApiSpec spec, final Ds3DocSpec docSpec) throws ParseException {
   final ImmutableList.Builder<Request> allRequestsBuilder = ImmutableList.builder();
   if (ConverterUtil.hasContent(spec.getRequests())) {
     for (final Ds3Request ds3Request : spec.getRequests()) {
       allRequestsBuilder.add(RequestConverter.toRequest(ds3Request, docSpec));
     }
   }
   return allRequestsBuilder.build();
 }