From 1811e0a06c2c299c54fe8f3b1f8f72f8f7a0f7d8 Mon Sep 17 00:00:00 2001 From: Vito0912 <86927734+Vito0912@users.noreply.github.com> Date: Sat, 27 Jul 2024 21:56:46 +0200 Subject: [PATCH] Added media to items endpoint --- docs/objects/LibraryItem.yaml | 4 ++++ docs/objects/mediaTypes/Book.yaml | 8 ++++++++ docs/objects/metadata/BookMetadata.yaml | 14 ++++++++++++++ docs/openapi.json | Bin 283378 -> 283900 bytes 4 files changed, 26 insertions(+) diff --git a/docs/objects/LibraryItem.yaml b/docs/objects/LibraryItem.yaml index 107ba9f3f..0e9ade14d 100644 --- a/docs/objects/LibraryItem.yaml +++ b/docs/objects/LibraryItem.yaml @@ -55,6 +55,10 @@ components: type: boolean mediaType: $ref: './mediaTypes/media.yaml#/components/schemas/mediaType' + media: + oneOf: + - $ref: './mediaTypes/Book.yaml#/components/schemas/bookMinified' + - $ref: './mediaTypes/Podcast.yaml#/components/schemas/Podcast' libraryItemMinified: type: object description: A single item on the server, like a book or podcast. Minified media format. diff --git a/docs/objects/mediaTypes/Book.yaml b/docs/objects/mediaTypes/Book.yaml index ebe2b63d9..a4191d5a7 100644 --- a/docs/objects/mediaTypes/Book.yaml +++ b/docs/objects/mediaTypes/Book.yaml @@ -68,3 +68,11 @@ components: description: The format of ebook of the book. Will be null if the book is an audiobook. type: string nullable: true + book: + allOf: + - $ref: '#/components/schemas/bookBase' + - type: object + properties: + metadata: + $ref: '../metadata/BookMetadata.yaml#/components/schemas/bookMetadata' + diff --git a/docs/objects/metadata/BookMetadata.yaml b/docs/objects/metadata/BookMetadata.yaml index faa054ac3..6f4769d17 100644 --- a/docs/objects/metadata/BookMetadata.yaml +++ b/docs/objects/metadata/BookMetadata.yaml @@ -124,3 +124,17 @@ components: description: The title of the chapter. type: string example: Wizards First Rule 01 Chapter 1 + bookMetadata: + allOf: + - $ref: '#/components/schemas/bookMetadataBase' + - type: object + properties: + authors: + type: array + items: + $ref: '../entities/Author.yaml#/components/schemas/author' + series: + type: array + items: + $ref: '../entities/Series.yaml#/components/schemas/series' + diff --git a/docs/openapi.json b/docs/openapi.json index 5a2f61347df7d83e10437b8a4fa73b4bb31ebc3a..c161925af368f536c64355421b17ef0814b0d209 100644 GIT binary patch delta 179 zcmV;k08Ib#r4jt85rBjNv;saLw-7P{mOPhGZUGLrP)-B>X_w4F11^_fWdb;tKs*C* zm%z&chLa#g1h-PS1Fk)nK*s|XmpXC+3b$S$0(KFX@Y4b&mmYHhB$K{hG?PFcCX?`t zJeQ7R0tlDzZvrZk8VHjR9wd`M9wwKdqX9~n;BEmTlkgfImoRVw5|^+T0Y;ZlDFh0) huxnub_4E#mr!m24wt~Q0S1>2*a8}tpcVpZw`^Sk VbZL_yMFh7%$O5iCw+i?J@?3S