Is there any way to validate the patch request body in spring boot?
Ex:
[
{"op": "replace", "path": "/id", "value": "foo"},
{"op": "replace", "path": "/id2", "value": "foo2"}
]
if any user sends the request with "op"(field) as "xx" and "path"(field) as "se". Is there any way to validate it and throw 400 (Bad Request), without changing the contract?