Skip to content

Commit 9b72400

Browse files
Brutus5000claude
andcommitted
Allow null steps in AchievementUpdateRequest
Jackson 3 (brought in by Spring Boot 4) defaults FAIL_ON_NULL_FOR_PRIMITIVES to true and treats absent JSON properties as null for primitive record components. The producer omits steps for REVEAL/UNLOCK operations, which Jackson 2 silently coerced to 0 but Jackson 3 now rejects, turning every such message into a poison pill that blocks the achievement queue. Switch steps to Integer and document via @Schema that it is only required for INCREMENT and SET_STEPS_AT_LEAST. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 96f3ed3 commit 9b72400

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/com/faforever/api/achievements/AchievementUpdateRequest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package com.faforever.api.achievements;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
4+
35
record AchievementUpdateRequest(
46
int playerId,
57
String achievementId,
68
Operation operation,
7-
int steps
9+
@Schema(description = "Required for INCREMENT and SET_STEPS_AT_LEAST; ignored (and may be null/omitted) for REVEAL and UNLOCK.", nullable = true)
10+
Integer steps
811
) {
912
public enum Operation {
1013
REVEAL, UNLOCK, INCREMENT, SET_STEPS_AT_LEAST

0 commit comments

Comments
 (0)