code: private URIBuilder addFieldsParam(URIBuilder builder, Class<? extends BaseResource> type, Collection<? extends Field> fields) {
      List<String> fieldNames = new ArrayList<>();
      for (Field f : fields) {
        fieldNames.add(f.getPropertyName());
      }
      String typeStr = BaseResource.getType(type);
      builder.addParameter("fields[" + typeStr + "]", String.join(",", fieldNames));
  
      return builder;
    }
docs: Add fields[type]=fieldName,fieldName,fieldName as a query parameter to the request represented by builder
  @param builder A URIBuilder building a request to the API
  @param type A BaseResource annotated with {@link com.github.jasminb.jsonapi.annotations.Type}
  @param fields A list of fields to include.  Only fields in this list will be retrieved in the query
  @return builder