Skip to content

[Bug]: Jakarta @Positive validation is not present in Swagger #5035

@aeiplatform

Description

@aeiplatform
Image
 "components": {
    "schemas": {
      "UnloadAmountRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "transactionReference": {
            "type": "string",
            "maxLength": 40,
            "minLength": 0,
            "pattern": "^[a-zA-Z0-9-]+$"
          }
        },
        "required": [
          "amount"
        ]
      },
public record UnloadAmountRequest(
    @NotNull @Positive BigDecimal amount,
    @Nullable String currency,
    @Nullable String description,
    @Nullable
    @Size(max = 40)
    @Pattern(regexp = "^[a-zA-Z0-9-]+$", message = "Only letters, digits and '-' are allowed")
    String transactionReference
) {
}

Version: 2.2.41

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions