diff --git a/program/views.py b/program/views.py index b70e0d78c41c7103bdcb2ca424ba5b0bc5ff606e..440a3e3a7f6b7a44294d9fbcb7ed5231415e7a97 100644 --- a/program/views.py +++ b/program/views.py @@ -25,6 +25,7 @@ from textwrap import dedent from django_filters.rest_framework import DjangoFilterBackend from drf_spectacular.utils import ( + OpenApiExample, OpenApiParameter, OpenApiResponse, OpenApiTypes, @@ -191,7 +192,38 @@ class APIDayScheduleViewSet( "Returns a list of the scheduled playout. " "The schedule will include virtual timeslots to fill unscheduled gaps if requested." ), - ), + examples=[ + OpenApiExample( + "Regular timeslot example", + summary="Regular timeslot", + description="Example values for a regular timeslot", + value={ + "end": "2024-06-19T20:30:00 +0000", + "id": 2, + "isVirtual": False, + "playlistId": None, + "repetitionOfId": None, + "scheduleId": 9, + "showDefaultPlaylistId": None, + "showId": 3, + "showName": "The Live Show", + "start": "2024-06-17T12:42:47.038Z", + }, + ), + OpenApiExample( + "Virtual timeslot example", + summary="Virtual timeslot", + description="Example values for a virtual timeslot", + value={ + "end": "2024-06-19T20:30:00 +0000", + "isVirtual": True, + "showId": 1, + "showName": "Musicpool", + "start": "2024-06-19T15:00:00 +0000", + }, + ), + ], + ) ) class APIPlayoutViewSet( mixins.ListModelMixin,