Skip to content
Snippets Groups Projects
Verified Commit dee702b7 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: add example Radio Settings annotation

parent 3f83c4ad
No related branches found
No related tags found
No related merge requests found
Pipeline #8285 passed
......@@ -937,7 +937,38 @@ class APILicenseViewSet(viewsets.ModelViewSet):
@extend_schema_view(
list=extend_schema(summary="List all settings."),
list=extend_schema(
# TODO: move this into the serializers
examples=[
OpenApiExample(
"Example Radio Settings",
value={
"id": 1,
"cba": {"domains": ["cba.media"]},
"imageRequirements": {
"host.image": {"frame": {"aspectRatio": [1, 1], "shape": "round"}},
"note.image": {"frame": {"aspectRatio": [16, 9], "shape": "round"}},
"show.image": {"frame": {"aspectRatio": [16, 9], "shape": "round"}},
"show.logo": {"frame": {"aspectRatio": [1, 1], "shape": "round"}},
},
"playout": {
"lineInChannels": {"0": "live", "1": "preprod"},
"pools": {"fallback": "Station Fallback Pool"},
},
"program": {
"micro": {"showId": None},
"fallback": {"showId": None, "defaultPool": "fallback"},
},
"station": {
"name": "Radio AURA",
"logo": None,
"website": "https://aura.radio",
},
},
)
],
summary="List all settings.",
),
)
class APIRadioSettingsViewSet(mixins.ListModelMixin, viewsets.GenericViewSet):
queryset = RadioSettings.objects.all()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment