Skip to content

Commit 4f705f8

Browse files
algolia-botClaraMullerFluf22
committed
fix(specs): invalid API format for multi feed in Comp API (generated)
algolia/api-clients-automation#5993 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com> Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
1 parent 45d91b8 commit 4f705f8

2 files changed

Lines changed: 66 additions & 4 deletions

File tree

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.composition;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.Objects;
9+
10+
/** Feed formatted as an injection. */
11+
public class FeedInjection {
12+
13+
@JsonProperty("injection")
14+
private Injection injection;
15+
16+
public FeedInjection setInjection(Injection injection) {
17+
this.injection = injection;
18+
return this;
19+
}
20+
21+
/** Get injection */
22+
@javax.annotation.Nonnull
23+
public Injection getInjection() {
24+
return injection;
25+
}
26+
27+
@Override
28+
public boolean equals(Object o) {
29+
if (this == o) {
30+
return true;
31+
}
32+
if (o == null || getClass() != o.getClass()) {
33+
return false;
34+
}
35+
FeedInjection feedInjection = (FeedInjection) o;
36+
return Objects.equals(this.injection, feedInjection.injection);
37+
}
38+
39+
@Override
40+
public int hashCode() {
41+
return Objects.hash(injection);
42+
}
43+
44+
@Override
45+
public String toString() {
46+
StringBuilder sb = new StringBuilder();
47+
sb.append("class FeedInjection {\n");
48+
sb.append(" injection: ").append(toIndentedString(injection)).append("\n");
49+
sb.append("}");
50+
return sb.toString();
51+
}
52+
53+
/**
54+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
55+
*/
56+
private String toIndentedString(Object o) {
57+
if (o == null) {
58+
return "null";
59+
}
60+
return o.toString().replace("\n", "\n ");
61+
}
62+
}

algoliasearch/src/main/java/com/algolia/model/composition/Multifeed.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
public class Multifeed {
1616

1717
@JsonProperty("feeds")
18-
private Map<String, Injection> feeds = new HashMap<>();
18+
private Map<String, FeedInjection> feeds = new HashMap<>();
1919

2020
@JsonProperty("feedsOrder")
2121
private List<String> feedsOrder;
2222

23-
public Multifeed setFeeds(Map<String, Injection> feeds) {
23+
public Multifeed setFeeds(Map<String, FeedInjection> feeds) {
2424
this.feeds = feeds;
2525
return this;
2626
}
2727

28-
public Multifeed putFeeds(String key, Injection feedsItem) {
28+
public Multifeed putFeeds(String key, FeedInjection feedsItem) {
2929
this.feeds.put(key, feedsItem);
3030
return this;
3131
}
@@ -34,7 +34,7 @@ public Multifeed putFeeds(String key, Injection feedsItem) {
3434
* A key-value store of Feed ID to Feed. Currently, the only supported Feed type is an Injection.
3535
*/
3636
@javax.annotation.Nonnull
37-
public Map<String, Injection> getFeeds() {
37+
public Map<String, FeedInjection> getFeeds() {
3838
return feeds;
3939
}
4040

0 commit comments

Comments
 (0)