Skip to content

Commit

Permalink
fix(specs): results in getObjects is required (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4024

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Oct 23, 2024
1 parent f21c54d commit 41a43bb
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,20 @@
public class GetObjectsResponse<T> {

@JsonProperty("results")
private List<T> results;
private List<T> results = new ArrayList<>();

public GetObjectsResponse<T> setResults(List<T> results) {
this.results = results;
return this;
}

public GetObjectsResponse<T> addResults(T resultsItem) {
if (this.results == null) {
this.results = new ArrayList<>();
}
this.results.add(resultsItem);
return this;
}

/** Retrieved records. */
@javax.annotation.Nullable
@javax.annotation.Nonnull
public List<T> getResults() {
return results;
}
Expand Down

0 comments on commit 41a43bb

Please sign in to comment.