Added media to items endpoint

This commit is contained in:
Vito0912 2024-07-27 21:56:46 +02:00
parent 9efd3537a4
commit 1811e0a06c
4 changed files with 26 additions and 0 deletions

View file

@ -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.

View file

@ -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'

View file

@ -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'

Binary file not shown.