Setup Pega to check the mandatory fields in a json - REST call
What I would like to know is how to setup Pega to check the mandatory fields in a json that is sent as part of the incomming REST call and send appropriate return code. I tried to do that as part of "Validation" under "Advanced" tab for the property under the mapped json class, see below details.
I have a REST service which I am testing various input scenarios and see how Pega sends the response back. When I wans testing the "mandatory field" in the incomming json, I added some validation data for the property in the class that are mapped to the json. I did the below changes and when I call the REST endpoint without the required field as part of the json, I dont get any error instead I get a valid response back.
What I would like to know is how to setup Pega to check the mandatory fields in a json that is sent as part of the incomming REST call and send appropriate return code. I tried to do that as part of "Validation" under "Advanced" tab for the property under the mapped json class, see below details.
I have a REST service which I am testing various input scenarios and see how Pega sends the response back. When I wans testing the "mandatory field" in the incomming json, I added some validation data for the property in the class that are mapped to the json. I did the below changes and when I call the REST endpoint without the required field as part of the json, I dont get any error instead I get a valid response back.
IDEXX-Int-RESTAPI-EvaluateTest-Accession.accessionId
Under Advanced tab, I have the following Validation on the property accessionId
1. Max length = 5
2. Min length = 3
3. Column inclusion = Required
Pls let me know if this the right way of doing it or if there is a different way of doing it.
***Moderator Edit-Vidyaranjan: Updated SR details***