Shallow copy or deep copy?
opened this issue · comments
The note about the attributes
object passed to validate()
says:
This object is distinct from the current attributes of the model and from the parameters passed to the operation. Since it is created by shallow copy, it is not possible to change any Number, String, or Boolean attribute of the input within the function, but it is possible to change attributes in nested objects.
So, the nested objects can be changed because they are deep copied? Aren't nested objects the ones that are shallow copied and everything else (direct members of attributes object) is deep copied?