In my REST API, I have a variable which can have only three values "E", "U" or null.
If any other values come-in , I want to through a validation exception or something alike.
Is there anything I can do with json annotations to handle it or any other way?
Below is a sample:
{
"name": "dave",
"Status": "E" , --this can have values only "E" or "U"
}