from flask_resources import BaseListSchema, MarshmallowSerializer
from flask_resources.serializers import JSONSerializer

from {{ui_record_schema_class|package_name}} import {{ui_record_schema_class|base_name}}



class {{current_model.record_ui_serializer_class|base_name}}(MarshmallowSerializer):
    """UI JSON serializer."""

    def __init__(self):
        """Initialise Serializer."""
        super().__init__(
            format_serializer_cls=JSONSerializer,
            object_schema_cls={{ui_record_schema_class|base_name}},
            list_schema_cls=BaseListSchema,
            schema_context={"object_key": "ui"},
        )