chore(api): fix schema enum names
This commit is contained in:
parent
1f7c2fa0ab
commit
10613cb20a
|
@ -166,8 +166,14 @@ AUTH_USER_MODEL = "core.User"
|
||||||
# Spectacular
|
# Spectacular
|
||||||
# https://drf-spectacular.readthedocs.io/en/latest/settings.html
|
# 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 = {
|
SPECTACULAR_SETTINGS = {
|
||||||
"TITLE": "LibreTime API",
|
"TITLE": "LibreTime API",
|
||||||
"DESCRIPTION": "Radio Broadcast & Automation Platform",
|
"DESCRIPTION": "Radio Broadcast & Automation Platform",
|
||||||
"VERSION": API_VERSION,
|
"VERSION": API_VERSION,
|
||||||
|
"ENUM_NAME_OVERRIDES": SPECTACULAR_ENUM_NAME_OVERRIDES,
|
||||||
}
|
}
|
||||||
|
|
|
@ -5415,7 +5415,7 @@ components:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
import_status:
|
import_status:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/ImportStatusEnum"
|
- $ref: "#/components/schemas/PlaylistContentKindEnum"
|
||||||
minimum: -2147483648
|
minimum: -2147483648
|
||||||
maximum: 2147483647
|
maximum: 2147483647
|
||||||
filepath:
|
filepath:
|
||||||
|
@ -5671,12 +5671,6 @@ components:
|
||||||
- mime
|
- mime
|
||||||
- name
|
- name
|
||||||
- size
|
- size
|
||||||
ImportStatusEnum:
|
|
||||||
enum:
|
|
||||||
- 0
|
|
||||||
- 1
|
|
||||||
- 2
|
|
||||||
type: integer
|
|
||||||
ImportedPodcast:
|
ImportedPodcast:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -5700,12 +5694,6 @@ components:
|
||||||
- item_url
|
- item_url
|
||||||
- override_album
|
- override_album
|
||||||
- podcast
|
- podcast
|
||||||
Kind1d2Enum:
|
|
||||||
enum:
|
|
||||||
- 0
|
|
||||||
- 1
|
|
||||||
- 2
|
|
||||||
type: integer
|
|
||||||
Library:
|
Library:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -5838,7 +5826,7 @@ components:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
import_status:
|
import_status:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/ImportStatusEnum"
|
- $ref: "#/components/schemas/PlaylistContentKindEnum"
|
||||||
minimum: -2147483648
|
minimum: -2147483648
|
||||||
maximum: 2147483647
|
maximum: 2147483647
|
||||||
filepath:
|
filepath:
|
||||||
|
@ -6219,7 +6207,7 @@ components:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
kind:
|
kind:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/Kind1d2Enum"
|
- $ref: "#/components/schemas/PlaylistContentKindEnum"
|
||||||
minimum: -32768
|
minimum: -32768
|
||||||
maximum: 32767
|
maximum: 32767
|
||||||
position:
|
position:
|
||||||
|
@ -7043,7 +7031,7 @@ components:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
kind:
|
kind:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/Kind1d2Enum"
|
- $ref: "#/components/schemas/PlaylistContentKindEnum"
|
||||||
minimum: -32768
|
minimum: -32768
|
||||||
maximum: 32767
|
maximum: 32767
|
||||||
position:
|
position:
|
||||||
|
@ -7091,6 +7079,12 @@ components:
|
||||||
- item_url
|
- item_url
|
||||||
- kind
|
- kind
|
||||||
- offset
|
- offset
|
||||||
|
PlaylistContentKindEnum:
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
type: integer
|
||||||
PlayoutHistory:
|
PlayoutHistory:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
Loading…
Reference in New Issue