Skip to content

Primitive types for nullable fields #123

Description

@tomas0svk

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions