"""Schema for playlists endpoint.""" from marshmallow import fields from sound_recordings.schemas.common import ( BaseSchema, PlaylistBreakdownSchema, SourceSchema, ) class PlaylistsSchema(BaseSchema): """Schema for sound recording playlists.""" isrc = fields.String() playlists = fields.Nested(PlaylistBreakdownSchema, many=True) sources = fields.Nested(SourceSchema, many=True) total_playlist_streams = fields.Integer()