fix-import-metadata-schema NOCHANGELOG
This commit is contained in:
parent
a19e0ac98c
commit
cba1727b4e
|
@ -20858,6 +20858,82 @@ components:
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- type
|
- type
|
||||||
|
ImportMetadata:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
maxLength: 500
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
maxLength: 5000
|
||||||
|
mbid:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
nullable: true
|
||||||
|
copyright:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
maxLength: 500
|
||||||
|
position:
|
||||||
|
type: integer
|
||||||
|
minimum: 1
|
||||||
|
nullable: true
|
||||||
|
tags:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
minItems: 0
|
||||||
|
license:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
required:
|
||||||
|
- title
|
||||||
|
ImportMetadataRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
minLength: 1
|
||||||
|
maxLength: 500
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
minLength: 1
|
||||||
|
maxLength: 5000
|
||||||
|
mbid:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
nullable: true
|
||||||
|
copyright:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
minLength: 1
|
||||||
|
maxLength: 500
|
||||||
|
position:
|
||||||
|
type: integer
|
||||||
|
minimum: 1
|
||||||
|
nullable: true
|
||||||
|
tags:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
minLength: 1
|
||||||
|
minItems: 0
|
||||||
|
license:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
cover:
|
||||||
|
type: string
|
||||||
|
writeOnly: true
|
||||||
|
nullable: true
|
||||||
|
album:
|
||||||
|
type: string
|
||||||
|
writeOnly: true
|
||||||
|
nullable: true
|
||||||
|
required:
|
||||||
|
- title
|
||||||
ImportStatusEnum:
|
ImportStatusEnum:
|
||||||
enum:
|
enum:
|
||||||
- draft
|
- draft
|
||||||
|
@ -22769,7 +22845,8 @@ components:
|
||||||
import_details: {}
|
import_details: {}
|
||||||
import_status:
|
import_status:
|
||||||
$ref: '#/components/schemas/ImportStatusEnum'
|
$ref: '#/components/schemas/ImportStatusEnum'
|
||||||
import_metadata: {}
|
import_metadata:
|
||||||
|
$ref: '#/components/schemas/ImportMetadata'
|
||||||
import_reference:
|
import_reference:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 50
|
maxLength: 50
|
||||||
|
@ -22782,6 +22859,7 @@ components:
|
||||||
- domain
|
- domain
|
||||||
- filename
|
- filename
|
||||||
- id
|
- id
|
||||||
|
- import_metadata
|
||||||
- is_local
|
- is_local
|
||||||
- library
|
- library
|
||||||
- listen_url
|
- listen_url
|
||||||
|
@ -22845,7 +22923,8 @@ components:
|
||||||
import_details: {}
|
import_details: {}
|
||||||
import_status:
|
import_status:
|
||||||
$ref: '#/components/schemas/ImportStatusEnum'
|
$ref: '#/components/schemas/ImportStatusEnum'
|
||||||
import_metadata: {}
|
import_metadata:
|
||||||
|
$ref: '#/components/schemas/ImportMetadataRequest'
|
||||||
import_reference:
|
import_reference:
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
@ -22857,6 +22936,7 @@ components:
|
||||||
required:
|
required:
|
||||||
- audio_file
|
- audio_file
|
||||||
- domain
|
- domain
|
||||||
|
- import_metadata
|
||||||
- library
|
- library
|
||||||
- track
|
- track
|
||||||
ManageUser:
|
ManageUser:
|
||||||
|
@ -24661,7 +24741,8 @@ components:
|
||||||
default: pending
|
default: pending
|
||||||
privacy_level:
|
privacy_level:
|
||||||
$ref: '#/components/schemas/LibraryPrivacyLevelEnum'
|
$ref: '#/components/schemas/LibraryPrivacyLevelEnum'
|
||||||
import_metadata: {}
|
import_metadata:
|
||||||
|
$ref: '#/components/schemas/ImportMetadataRequest'
|
||||||
import_reference:
|
import_reference:
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
@ -25788,7 +25869,8 @@ components:
|
||||||
$ref: '#/components/schemas/LibraryPrivacyLevelEnum'
|
$ref: '#/components/schemas/LibraryPrivacyLevelEnum'
|
||||||
import_details:
|
import_details:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
import_metadata: {}
|
import_metadata:
|
||||||
|
$ref: '#/components/schemas/ImportMetadata'
|
||||||
import_reference:
|
import_reference:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 50
|
maxLength: 50
|
||||||
|
@ -25828,7 +25910,8 @@ components:
|
||||||
default: pending
|
default: pending
|
||||||
privacy_level:
|
privacy_level:
|
||||||
$ref: '#/components/schemas/LibraryPrivacyLevelEnum'
|
$ref: '#/components/schemas/LibraryPrivacyLevelEnum'
|
||||||
import_metadata: {}
|
import_metadata:
|
||||||
|
$ref: '#/components/schemas/ImportMetadataRequest'
|
||||||
import_reference:
|
import_reference:
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
|
@ -626,6 +626,7 @@ class ManageUploadSerializer(serializers.ModelSerializer):
|
||||||
track = ManageNestedTrackSerializer()
|
track = ManageNestedTrackSerializer()
|
||||||
library = ManageNestedLibrarySerializer()
|
library = ManageNestedLibrarySerializer()
|
||||||
domain = serializers.CharField(source="domain_name")
|
domain = serializers.CharField(source="domain_name")
|
||||||
|
import_metadata = music_serializers.ImportMetadataField()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = music_models.Upload
|
model = music_models.Upload
|
||||||
|
|
|
@ -463,6 +463,7 @@ class ImportMetadataSerializer(serializers.Serializer):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@extend_schema_field(ImportMetadataSerializer)
|
||||||
class ImportMetadataField(serializers.JSONField):
|
class ImportMetadataField(serializers.JSONField):
|
||||||
def to_internal_value(self, v):
|
def to_internal_value(self, v):
|
||||||
v = super().to_internal_value(v)
|
v = super().to_internal_value(v)
|
||||||
|
|
Loading…
Reference in New Issue