From fb75b59a343e61d5bd85693667fe89b4268beeea Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Wed, 19 Jun 2024 20:38:56 -0400 Subject: [PATCH] fix: update example responses --- program/views.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/program/views.py b/program/views.py index 7585bfa5..d32bc160 100644 --- a/program/views.py +++ b/program/views.py @@ -144,34 +144,40 @@ class APIDayScheduleViewSet( "Returns a list of the scheduled playout. " "The schedule will include virtual timeslots to fill unscheduled gaps if requested." ), + # TODO: move this into the serializers examples=[ OpenApiExample( "Regular timeslot example", summary="Regular timeslot", description="Example values for a regular timeslot", + response_only=True, value={ - "end": "2024-06-19T20:30:00 +0000", - "id": 2, + "end": "2024-06-19T20:30:00", + "episodeTitle": "First live show!", "isVirtual": False, + "memo": "Things that I should not forget", "playlistId": None, "repetitionOfId": None, "scheduleId": 9, "showDefaultPlaylistId": None, "showId": 3, "showName": "The Live Show", - "start": "2024-06-17T12:42:47.038Z", + "start": "2024-06-19T19:15:00", + "timeslotId": 2, }, ), OpenApiExample( "Virtual timeslot example", summary="Virtual timeslot", description="Example values for a virtual timeslot", + response_only=True, value={ - "end": "2024-06-19T20:30:00 +0000", + "end": "2024-06-19T20:30:00", + "episodeTitle": "Music from the archive", "isVirtual": True, "showId": 1, - "showName": "Musicpool", - "start": "2024-06-19T15:00:00 +0000", + "showName": "Music pool", + "start": "2024-06-19T15:00:00", }, ), ], -- GitLab