diff --git a/docs/controllers/LibraryItemController.yaml b/docs/controllers/LibraryItemController.yaml index 932bb558b..94d495189 100644 --- a/docs/controllers/LibraryItemController.yaml +++ b/docs/controllers/LibraryItemController.yaml @@ -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' diff --git a/docs/objects/LibraryItem.yaml b/docs/objects/LibraryItem.yaml index f6dbd4b56..ecf70127c 100644 --- a/docs/objects/LibraryItem.yaml +++ b/docs/objects/LibraryItem.yaml @@ -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. diff --git a/docs/objects/files/AudioFile.yaml b/docs/objects/files/AudioFile.yaml index 20994438f..6092af262 100644 --- a/docs/objects/files/AudioFile.yaml +++ b/docs/objects/files/AudioFile.yaml @@ -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' + diff --git a/docs/objects/mediaTypes/Book.yaml b/docs/objects/mediaTypes/Book.yaml index 2793393c0..c4f891fba 100644 --- a/docs/objects/mediaTypes/Book.yaml +++ b/docs/objects/mediaTypes/Book.yaml @@ -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: diff --git a/docs/objects/metadata/BookMetadata.yaml b/docs/objects/metadata/BookMetadata.yaml index 6f4769d17..142012553 100644 --- a/docs/objects/metadata/BookMetadata.yaml +++ b/docs/objects/metadata/BookMetadata.yaml @@ -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' diff --git a/docs/openapi.json b/docs/openapi.json index 8e90ee61c..9e2e04872 100644 Binary files a/docs/openapi.json and b/docs/openapi.json differ