-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
Milestone
Description
Consider the following schema:
'entity': {
'name': {
'type': 'string',
'required': True },
'contact': {
'type': 'dict',
'required': True,
'schema': {
'phone': {
'type': 'string',
'required': False,
'default': '1234567890' },
'email': {
'type': 'string',
'required': False,
'default': 'abc@efg.com' },
}
}
}
Assume I have data like:
{
"name": "test",
"contact: {
"phone": "0987654321",
"email": "uvw@xyz.com"
}
}
When I do a patch with data {"contact.phone": "1111111111"} to update the phone only:
Expected behavior
The data will be changed to
{
"name": "test",
"contact: {
"phone": "1111111111",
"email": "uvw@xyz.com"
}
}
Actual Behavior
But the data I get is:
{
"name": "test",
"contact: {
"phone": "1111111111",
"email": "abc@efg.com"
}
}
Yes, the email is also changed: since email is not provided in PATCH body, its default value is used. Is it the intended behavior for eve?
Environment
- Python version: 3.5.2
- Eve version: 0.8.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels