At this moment the use of namespace on model is mandatory. In addition, the namespace is shared between both request and response.
It can happen that in some cases you don't want to wrap request or response
Lets say that you make a request with json presented bellow
{
"user": {
"email": "user@example.com",
"password": "Password1"
}
}
the expected response is parsed to object only if it is wrapped in the same namespace
{
"user": {
"id": 1,
"email": "user@example.com"
}
}
desired behavior would work also with the following response
{
"id": 1,
"email": "user@example.com"
}
The same thing is valid for unwrapped requests.
At this moment the use of namespace on model is mandatory. In addition, the namespace is shared between both request and response.
It can happen that in some cases you don't want to wrap request or response
Lets say that you make a request with json presented bellow
the expected response is parsed to object only if it is wrapped in the same namespace
desired behavior would work also with the following response
The same thing is valid for unwrapped requests.