Optional attributes of various types use primitive type (e.g. int, double) together with jakarta.@nullable annotations.
- annotation is meaningless
- default value (0) is transmitted, so consumer cannot distinguish between not_set and literal 0.
Additionally, price* aiitributes use String, while BigDecimal would be far more reasonable and safer for client.
For instance BaseBet
/**
* The current price of the bet.
* This can be {@code null} if not set.
*/
@Nullable public String price;
/**
* The probability of the bet.
*/
@Nullable public double probability;
/**
* The participant ID associated with the bet.
*/
@Nullable public int participantId;
/**
* The player ID associated with the bet.
*/
@Nullable public int playerId;
Optional attributes of various types use primitive type (e.g. int, double) together with jakarta.@nullable annotations.
Additionally,
price*aiitributes use String, while BigDecimal would be far more reasonable and safer for client.For instance
BaseBet