Skip to content

Enforce request validation for add-to-cart API - #7

Open
AyushChandekar27 wants to merge 1 commit into
vatri:masterfrom
AyushChandekar27:patch-1
Open

Enforce request validation for add-to-cart API#7
AyushChandekar27 wants to merge 1 commit into
vatri:masterfrom
AyushChandekar27:patch-1

Conversation

@AyushChandekar27

Copy link
Copy Markdown

This PR enforces request validation in CartController by applying @Valid on the
request body and handling validation failures using BindingResult.

Previously, validation was configured but not enforced, allowing invalid request
payloads to reach the service layer. This change improves API correctness without
altering existing business logic.

This change enforces request validation for the add-to-cart API by applying @Valid
on the request body and handling validation errors using BindingResult.

Previously, validation was configured but not enforced, allowing invalid payloads
to reach the service layer. This update improves API correctness without modifying
existing business logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant