File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -917,7 +917,7 @@ def from_api_repr(cls, resource: dict) -> SerDeInfo:
917917 return config
918918
919919
920- class Schema :
920+ class Schema ( collections . UserList ) :
921921 # TODO docstrings and type hints
922922 def __init__ (self , fields = None , foreign_type_info = None ):
923923 self ._properties = {}
@@ -944,6 +944,15 @@ def _fields(self, value: list) -> None:
944944 value = _isinstance_or_raise (value , list , none_allowed = True )
945945 self ._properties ["_fields" ] = value
946946
947+ @property
948+ def data (self ):
949+ return self ._properties .get ("_fields" )
950+
951+ @data .setter
952+ def data (self , value : list ):
953+ # for simplicity, no validation in this proof of concept
954+ self ._properties ["_fields" ] = value
955+
947956 def __len__ (self ):
948957 return len (self ._fields )
949958
You can’t perform that action at this time.
0 commit comments