code: def get_api_field_data(self):
          
          field = self.setup_field()
          d = {
              'class': field.__class__.__name__,
              'widget': {
                  'class': field.widget.__class__.__name__
              }
          }
  
          try:
              d['input_type'] = field.widget.input_type
          except AttributeError:
              # some widgets, such as Select do not have an input type
              # in django < 1.11
              d['input_type'] = None
  
          return d
docs: Field data to serialize for use on front-end side, for example
          will include choices available for a choice field