def _get_field_info(
        self,
        field: Field,
        filter_rel_field: Dict[str, Any],
        page: Optional[int] = None,
        page_size: Optional[int] = None,
    ) -> Dict[str, Any]:
        """
        Return a dict with field details
        ready to serve as a response

        :param field: marshmallow field
        :return: dict with field details
        """
        ret = {
            "name": field.name,
            "label": _(self.label_columns.get(field.name, "")),
            "description": _(self.description_columns.get(field.name, "")),
            "type": field.__class__.__name__,
            "required": field.required,
            # When using custom marshmallow schemas fields don't have unique property
            "unique": getattr(field, "unique", False),
        }
        # Handles related fields
        if isinstance(field, Related) or isinstance(field, RelatedList):
            ret["count"], ret["values"] = self._get_list_related_field(
                field, filter_rel_field, page=page, page_size=page_size
            )
        if field.validate and isinstance(field.validate, list):
            ret["validate"] = [str(v) for v in field.validate]
        elif field.validate:
            ret["validate"] = [str(field.validate)]
        return ret

        Return a dict with field details
        ready to serve as a response

        :param field: marshmallow field
        :return: dict with field details
        
flask_appbuilder/api/__init__.py