Allow and abstract private extra data in the API
Review Request #7674 — Created Oct. 2, 2015 and submitted — Latest diff uploaded
The webapi allows for arbitrary data to be set in
extra_data
for certain API resources. Currently, all of that information is accessible through the API which is not always desirable.
The change in progress will allow users to specify privateextra_data
which will be abstracted from the publicly api available information.Change prohibits any kind of modification to private variables (denoted by a leading double-undersore
__
) in resources containing extra_data, as well as removing the private fields when a resource is requested.Added
APIExtraDataHook
to allow extension writers to give access states to extra_data fields.
Added new PUT, POST and GET tests for
__
denoted private extra_data.
Ran all tests.Added new tests for testing the
APIExtraDataHook
.