chore(api): fix schema enum names

This commit is contained in:
jo 2022-07-19 19:21:58 +02:00 committed by Jonas L
parent 1f7c2fa0ab
commit 10613cb20a
2 changed files with 16 additions and 16 deletions

View File

@ -166,8 +166,14 @@ AUTH_USER_MODEL = "core.User"
# Spectacular
# https://drf-spectacular.readthedocs.io/en/latest/settings.html
SPECTACULAR_ENUM_NAME_OVERRIDES = {
"SmartBlockKindEnum": "libretime_api.schedule.models.SmartBlock.Kind",
"PlaylistContentKindEnum": "libretime_api.schedule.models.PlaylistContent.Kind",
}
SPECTACULAR_SETTINGS = {
"TITLE": "LibreTime API",
"DESCRIPTION": "Radio Broadcast & Automation Platform",
"VERSION": API_VERSION,
"ENUM_NAME_OVERRIDES": SPECTACULAR_ENUM_NAME_OVERRIDES,
}

View File

@ -5415,7 +5415,7 @@ components:
readOnly: true
import_status:
allOf:
- $ref: "#/components/schemas/ImportStatusEnum"
- $ref: "#/components/schemas/PlaylistContentKindEnum"
minimum: -2147483648
maximum: 2147483647
filepath:
@ -5671,12 +5671,6 @@ components:
- mime
- name
- size
ImportStatusEnum:
enum:
- 0
- 1
- 2
type: integer
ImportedPodcast:
type: object
properties:
@ -5700,12 +5694,6 @@ components:
- item_url
- override_album
- podcast
Kind1d2Enum:
enum:
- 0
- 1
- 2
type: integer
Library:
type: object
properties:
@ -5838,7 +5826,7 @@ components:
readOnly: true
import_status:
allOf:
- $ref: "#/components/schemas/ImportStatusEnum"
- $ref: "#/components/schemas/PlaylistContentKindEnum"
minimum: -2147483648
maximum: 2147483647
filepath:
@ -6219,7 +6207,7 @@ components:
readOnly: true
kind:
allOf:
- $ref: "#/components/schemas/Kind1d2Enum"
- $ref: "#/components/schemas/PlaylistContentKindEnum"
minimum: -32768
maximum: 32767
position:
@ -7043,7 +7031,7 @@ components:
readOnly: true
kind:
allOf:
- $ref: "#/components/schemas/Kind1d2Enum"
- $ref: "#/components/schemas/PlaylistContentKindEnum"
minimum: -32768
maximum: 32767
position:
@ -7091,6 +7079,12 @@ components:
- item_url
- kind
- offset
PlaylistContentKindEnum:
enum:
- 0
- 1
- 2
type: integer
PlayoutHistory:
type: object
properties: