Skip to content

Commit d4fb731

Browse files
committed
web: add @JsonProperty to request fields with camelCase names
Host applications that configure Jackson with SNAKE_CASE PropertyNamingStrategy would fail to deserialize fields like aggregationType (→ aggregation_type), dateTypes (→ date_types), srcType/dstType, and consumerName. Adding explicit @JsonProperty annotations pins the JSON key to the camelCase name that the JavaScript dashboard already sends, making rqueue immune to the host app's global naming strategy. Assisted-By: Claude Code
1 parent 74a28ff commit d4fb731

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

rqueue-core/src/main/java/com/github/sonus21/rqueue/models/request/ChartDataRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.github.sonus21.rqueue.models.request;
1818

19+
import com.fasterxml.jackson.annotation.JsonProperty;
1920
import com.github.sonus21.rqueue.config.RqueueWebConfig;
2021
import com.github.sonus21.rqueue.models.SerializableBase;
2122
import com.github.sonus21.rqueue.models.enums.AggregationType;
@@ -39,7 +40,10 @@ public class ChartDataRequest extends SerializableBase {
3940
private ChartType type;
4041
private String queue;
4142
private int number;
43+
@JsonProperty("aggregationType")
4244
private AggregationType aggregationType;
45+
46+
@JsonProperty("dateTypes")
4347
private List<ChartDataType> dateTypes;
4448

4549
public ChartDataRequest(ChartType chartType, AggregationType aggregationType) {

rqueue-core/src/main/java/com/github/sonus21/rqueue/models/request/MessageMoveRequest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.github.sonus21.rqueue.models.request;
1818

19+
import com.fasterxml.jackson.annotation.JsonProperty;
1920
import com.github.sonus21.rqueue.config.RqueueWebConfig;
2021
import com.github.sonus21.rqueue.models.enums.DataType;
2122
import com.github.sonus21.rqueue.utils.StringUtils;
@@ -36,8 +37,10 @@ public class MessageMoveRequest implements Serializable {
3637

3738
private static final long serialVersionUID = -5105668034442269108L;
3839
private String src;
40+
@JsonProperty("srcType")
3941
private DataType srcType;
4042
private String dst;
43+
@JsonProperty("dstType")
4144
private DataType dstType;
4245

4346
private Map<String, Serializable> others = new HashMap<>();

rqueue-core/src/main/java/com/github/sonus21/rqueue/models/request/QueueExploreRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ public class QueueExploreRequest extends SerializableBase {
5050
* first sequence, so the explorer shows messages that are still pending for this specific
5151
* consumer rather than the entire retained window.
5252
*/
53+
@JsonProperty("consumerName")
5354
private String consumerName;
5455
}

0 commit comments

Comments
 (0)