mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-10 22:09:38 +00:00
Split schema to sub files
This commit is contained in:
parent
afe40be957
commit
c7ac12a67a
14 changed files with 964 additions and 957 deletions
70
docs/objects/mediaTypes/Book.yaml
Normal file
70
docs/objects/mediaTypes/Book.yaml
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
components:
|
||||
schemas:
|
||||
bookCoverPath:
|
||||
description: The absolute path on the server of the cover file. Will be null if there is no cover.
|
||||
type: string
|
||||
nullable: true
|
||||
example: /audiobooks/Terry Goodkind/Sword of Truth/Wizards First Rule/cover.jpg
|
||||
bookBase:
|
||||
type: object
|
||||
description: Base book schema
|
||||
properties:
|
||||
libraryItemId:
|
||||
$ref: '../LibraryItem.yaml#/components/schemas/libraryItemId'
|
||||
coverPath:
|
||||
$ref: '#/components/schemas/bookCoverPath'
|
||||
tags:
|
||||
$ref: '../../schemas.yaml#/components/schemas/tags'
|
||||
audioFiles:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/audioFile'
|
||||
chapters:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/bookChapter'
|
||||
missingParts:
|
||||
description: Any parts missing from the book by track index.
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
ebookFile:
|
||||
$ref: '#/components/schemas/ebookFile'
|
||||
bookMinified:
|
||||
type: object
|
||||
description: Minified book schema. Does not depend on `bookBase` because there's pretty much no overlap.
|
||||
properties:
|
||||
metadata:
|
||||
$ref: '../metadata/BookMetadata.yaml#/components/schemas/bookMetadataMinified'
|
||||
coverPath:
|
||||
$ref: '#/components/schemas/bookCoverPath'
|
||||
tags:
|
||||
$ref: '../../schemas.yaml#/components/schemas/tags'
|
||||
numTracks:
|
||||
description: The number of tracks the book's audio files have.
|
||||
type: integer
|
||||
example: 1
|
||||
numAudioFiles:
|
||||
description: The number of audio files the book has.
|
||||
type: integer
|
||||
example: 1
|
||||
numChapters:
|
||||
description: The number of chapters the book has.
|
||||
type: integer
|
||||
example: 1
|
||||
numMissingParts:
|
||||
description: The total number of missing parts the book has.
|
||||
type: integer
|
||||
example: 0
|
||||
numInvalidAudioFiles:
|
||||
description: The number of invalid audio files the book has.
|
||||
type: integer
|
||||
example: 0
|
||||
duration:
|
||||
$ref: '../../schemas.yaml#/components/schemas/durationSec'
|
||||
size:
|
||||
$ref: '../../schemas.yaml#/components/schemas/size'
|
||||
ebookFormat:
|
||||
description: The format of ebook of the book. Will be null if the book is an audiobook.
|
||||
type: string
|
||||
nullable: true
|
||||
10
docs/objects/mediaTypes/media.yaml
Normal file
10
docs/objects/mediaTypes/media.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
components:
|
||||
schemas:
|
||||
mediaType:
|
||||
type: string
|
||||
description: The type of media, will be book or podcast.
|
||||
enum: [book, podcast]
|
||||
mediaMinified:
|
||||
description: The minified media of the library item.
|
||||
oneOf:
|
||||
- $ref: './Book.yaml#/components/schemas/bookMinified'
|
||||
Loading…
Add table
Add a link
Reference in a new issue