(self, obj)
return properties
Fill out properties field.
Fill out properties field.
Fill out properties field .
def get_properties(self, obj) -> typing.Dict[str, typing.Dict[str, typing.Any]]:
        """Fill out properties field."""
        properties = self.dict_class()

        if self.props_ordered:
            fields_items_sequence = obj.fields.items()
        else:
            fields_items_sequence = sorted(obj.fields.items())

        for field_name, field in fields_items_sequence:
            schema = self._get_schema_for_field(obj, field)
            properties[
                field.metadata.get("name") or field.data_key or field.name
            ] = schema

        return properties
def get_properties ( self , obj ) -> typing . Dict [ str , typing . Dict [ str , typing . Any ] ] : properties = self . dict_class ( ) if self . props_ordered : fields_items_sequence = obj . fields . items ( ) else : fields_items_sequence = sorted ( obj . fields . items ( ) ) for field_name , field in fields_items_sequence : schema = self . _get_schema_for_field ( obj , field ) properties [ field . metadata . get ( "name" ) or field . data_key or field . name ] = schema return properties