from marshmallow import Schema, fields, validate 

class RefreshTokenSchema(Schema):
    """
    Schema for a refresh token.

    Attributes:
        refresh (str): The refresh token string.
    """

    # Define the 'refresh' field as a string field
    refresh = fields.String(
        required=True,  # The 'refresh' field is required
        validate=validate.Length(min=1),  # Validate that the string length is at least 1 character
        error_messages={'required': 'Refresh Token is required.'},  
        description='The refresh token string.',  # Description of the 'refresh' field
    )