From e6d4e89bd1d290c691674367f69f6e11f1cc7dd9 Mon Sep 17 00:00:00 2001 From: Vito0912 <86927734+Vito0912@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:44:43 +0200 Subject: [PATCH] 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 --- docs/controllers/LibraryItemController.yaml | 5 +++-- docs/objects/LibraryItem.yaml | 13 ++++++++++++- docs/objects/files/AudioFile.yaml | 17 +++++++++++++++++ docs/objects/mediaTypes/Book.yaml | 4 ++++ docs/objects/metadata/BookMetadata.yaml | 16 +++++++++++++--- docs/openapi.json | Bin 288130 -> 298894 bytes 6 files changed, 49 insertions(+), 6 deletions(-) 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 8e90ee61c07ea7389b48750a69873ebd1ae3dbbf..9e2e04872117b71a0216be6e3a46df4111b1e161 100644 GIT binary patch delta 1509 zcmZuxZEO@(6rH(mO1DGVPHVdqSjx1Nx@tH zq?QjWfl_(4#~8)N_=8A8ih>hkW45Frh=w$pC^m?MMBoRSjbFdOcxQ@GKQhT=^5))m z?>YCJ+xbOq_q%x=`_$8Pz7XlN>T;RBVfK!QBJ@0}hGc5P0PJoGVMPvwAI(y>z0bX?v*m)+4_A`(P+NEmo~ zNCe#IdRnOB>KYE}IwyiK_KTlkJwsLKIY>6F@70AcDk`)SDh|x5}Tj`~HtU2XsA=AKM0!}1V01)S{!gQys-$xx8&0uE!s+C`4xAG$us;_X zj%}i+vF8&J$aIvL(x&W0ohu&1?F^yMh$}BDrm~YyV@k8KmA^MD+mse1p|s=m!_*5q zpNpM*Os)2roqU%lWr^YwJ0EtVx@gLTQzeO9QfJ*K$jx6sV_|8$9G)Cwp4+%Ui}D(^AybQ739*OmRzsMY8q?6;5mAHj{qy z%{;kn3?b&XzC#X|Op~MeI+CR#AeJe$7_Qb_IFhpEvDK#62&|vfa%tI1QQpWrho^|? za0U}6CXJ1Y$ECzf8MyMT2+R6b4MV>( zY96JIi}iF9W+MYQeX7E*cl5&ro**jGQO}z5uz4iq$?%(n()=|j2cIpGsV7Rny3mkp zqTqiseKlUqqE&eRDT;ccDmuDX_p)U4j)pX-0^>1tTIGad+;=vGD0LABf-{-PywvEH~hsk6Rk&q3C6g(s@gNjIp z81|E1hl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