-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Make VaultDto ID non-nullable. #319
base: develop
Are you sure you want to change the base?
Make VaultDto ID non-nullable. #319
Conversation
WalkthroughThe changes update the ✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
@@ -495,7 +495,7 @@ public Response claimOwnership(@PathParam("vaultId") UUID vaultId, @FormParam("p | |||
} | |||
|
|||
|
|||
public record VaultDto(@JsonProperty("id") UUID id, | |||
public record VaultDto(@JsonProperty("id") @NotBlank UUID id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace @NotBlank
with @NotNull
for UUID field.
The @NotBlank
annotation is designed for String fields to ensure they contain at least one non-whitespace character. For UUID fields, @NotNull
is more appropriate as it ensures the field is not null without attempting to check for blank characters.
Apply this diff to fix the annotation:
- public record VaultDto(@JsonProperty("id") @NotBlank UUID id,
+ public record VaultDto(@JsonProperty("id") @NotNull UUID id,
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
public record VaultDto(@JsonProperty("id") @NotBlank UUID id, | |
public record VaultDto(@JsonProperty("id") @NotNull UUID id, |
Make VaultDto ID non-nullable.