Updated LibraryItemController Paths (See description)

Added missing abridged
Fixed wrong type on start of bookChapter
Added missing libraryFile for LibraryItem
Added missing type to id in media
This commit is contained in:
Vito0912 2024-07-29 21:44:43 +02:00
parent 11826c37a3
commit e6d4e89bd1
6 changed files with 49 additions and 6 deletions

View file

@ -36,6 +36,7 @@ paths:
content:
application/json:
schema:
description: TODO - Add minified library item object
type: object
description: TODO
oneOf:
- $ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItemBase'
- $ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItem'

View file

@ -56,7 +56,7 @@ components:
mediaType:
$ref: './mediaTypes/media.yaml#/components/schemas/mediaType'
media:
$ref: './mediaTypes/Book.yaml#/components/schemas/bookMinified'
$ref: './mediaTypes/Book.yaml#/components/schemas/book'
libraryItemMinified:
type: object
description: A single item on the server, like a book or podcast. Minified media format.
@ -66,6 +66,17 @@ components:
properties:
media:
$ref: './mediaTypes/media.yaml#/components/schemas/mediaMinified'
libraryItem:
type: object
description: A single item on the server, like a book or podcast.
allOf:
- $ref: '#/components/schemas/libraryItemBase'
- type: object
properties:
libraryFiles:
type: array
items:
$ref: './files/AudioFile.yaml#/components/schemas/libraryFile'
libraryItemSequence:
type: object
description: A single item on the server, like a book or podcast. Includes series sequence information.

View file

@ -92,3 +92,20 @@ components:
description: The MIME type of the audio file.
type: string
example: audio/mpeg
libraryFile:
type: object
description: A library file. Includes the path and metadata of the file.
properties:
ino:
$ref: '../../schemas.yaml#/components/schemas/inode'
addedAt:
$ref: '../../schemas.yaml#/components/schemas/addedAt'
updatedAt:
$ref: '../../schemas.yaml#/components/schemas/updatedAt'
fileType:
description: The type of file.
type: string
example: audio
metadata:
$ref: '../metadata/FileMetadata.yaml#/components/schemas/fileMetadata'

View file

@ -11,6 +11,9 @@ components:
properties:
id:
description: TODO
type: string
format: uuid
example: e4bb1afb-4a4f-4dd6-8be0-e615d233185b
libraryItemId:
$ref: '../LibraryItem.yaml#/components/schemas/libraryItemId'
coverPath:
@ -23,6 +26,7 @@ components:
$ref: '../files/AudioFile.yaml#/components/schemas/audioFile'
chapters:
type: array
nullable: true
items:
$ref: '../metadata/BookMetadata.yaml#/components/schemas/bookChapter'
missingParts:

View file

@ -78,6 +78,10 @@ components:
description: Whether the book has been marked as explicit.
type: boolean
example: false
abridged:
description: Whether the book is abridged.
type: boolean
example: false
bookMetadataMinified:
type: object
description: The minified metadata for a book in the database.
@ -107,6 +111,7 @@ components:
bookChapter:
type: object
description: A book chapter. Includes the title and timestamps.
nullable: true
properties:
id:
description: The ID of the book chapter.
@ -114,7 +119,7 @@ components:
example: 0
start:
description: When in the book (in seconds) the chapter starts.
type: integer
type: number
example: 0
end:
description: When in the book (in seconds) the chapter ends.
@ -132,9 +137,14 @@ components:
authors:
type: array
items:
$ref: '../entities/Author.yaml#/components/schemas/author'
$ref: '../entities/Author.yaml#/components/schemas/authorMinified'
narrators:
type: array
items:
type: string
example: Sam Tsoutsouvas
series:
type: array
items:
$ref: '../entities/Series.yaml#/components/schemas/series'
$ref: '../entities/Series.yaml#/components/schemas/seriesSequence'

Binary file not shown.