mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-14 13:21:39 +00:00
Initial library schema
This commit is contained in:
parent
76100b680e
commit
5fdfc9e454
3 changed files with 92 additions and 9 deletions
|
|
@ -3,10 +3,75 @@ components:
|
||||||
oldLibraryId:
|
oldLibraryId:
|
||||||
type: string
|
type: string
|
||||||
description: The ID of the libraries created on server version 2.2.23 and before.
|
description: The ID of the libraries created on server version 2.2.23 and before.
|
||||||
format: "lib_[a-z0-9]{18}"
|
format: 'lib_[a-z0-9]{18}'
|
||||||
example: lib_o78uaoeuh78h6aoeif
|
example: lib_o78uaoeuh78h6aoeif
|
||||||
libraryId:
|
libraryId:
|
||||||
type: string
|
type: string
|
||||||
description: The ID of the library.
|
description: The ID of the library.
|
||||||
format: uuid
|
format: uuid
|
||||||
example: e4bb1afb-4a4f-4dd6-8be0-e615d233185b
|
example: e4bb1afb-4a4f-4dd6-8be0-e615d233185b
|
||||||
|
libraryName:
|
||||||
|
description: The name of the library.
|
||||||
|
type: string
|
||||||
|
example: My Audiobooks
|
||||||
|
librarySettings:
|
||||||
|
description: The settings for the library.
|
||||||
|
allOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
coverAspectRatio:
|
||||||
|
description: Whether the library should use square book covers. Must be 0 (for false) or 1 (for true).
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
disableWatcher:
|
||||||
|
description: Whether to disable the folder watcher for the library.
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
skipMatchingMediaWithAsin:
|
||||||
|
description: Whether to skip matching books that already have an ASIN.
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
skipMatchingMediaWithIsbn:
|
||||||
|
description: Whether to skip matching books that already have an ISBN.
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
autoScanCronExpression:
|
||||||
|
description: The cron expression for when to automatically scan the library folders. If null, automatic scanning will be disabled.
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
example: '0 0 0 * * *'
|
||||||
|
library:
|
||||||
|
description: A library object which includes either books or podcasts.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
$ref: '#/components/schemas/libraryId'
|
||||||
|
name:
|
||||||
|
$ref: '#/components/schemas/libraryName'
|
||||||
|
folders:
|
||||||
|
description: The folders that belong to the library.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: './Folder.yaml#/components/schemas/folder'
|
||||||
|
displayOrder:
|
||||||
|
description: Display position of the library in the list of libraries. Must be >= 1.
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
icon:
|
||||||
|
description: The selected icon for the library. See Library Icons for a list of possible icons.
|
||||||
|
type: string
|
||||||
|
example: 'audiobookshelf'
|
||||||
|
mediaType:
|
||||||
|
description: The type of media that the library contains. Will be `book` or `podcast`. (Read Only)
|
||||||
|
type: string
|
||||||
|
example: 'book'
|
||||||
|
provider:
|
||||||
|
description: Preferred metadata provider for the library. See Metadata Providers for a list of possible providers.
|
||||||
|
type: string
|
||||||
|
example: 'audible'
|
||||||
|
settings:
|
||||||
|
$ref: '#/components/schemas/librarySettings'
|
||||||
|
createdAt:
|
||||||
|
$ref: './../schemas.yaml#/components/schemas/createdAt'
|
||||||
|
lastUpdate:
|
||||||
|
$ref: './../schemas.yaml#/components/schemas/updatedAt'
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -9,6 +9,7 @@ servers:
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
BearerAuth:
|
BearerAuth:
|
||||||
|
description: Bearer authentication
|
||||||
type: http
|
type: http
|
||||||
scheme: bearer
|
scheme: bearer
|
||||||
responses:
|
responses:
|
||||||
|
|
@ -152,6 +153,23 @@ paths:
|
||||||
- $ref: './controllers/AuthorController.yaml#/components/schemas/authorUpdated'
|
- $ref: './controllers/AuthorController.yaml#/components/schemas/authorUpdated'
|
||||||
404:
|
404:
|
||||||
$ref: './controllers/AuthorController.yaml#/components/responses/author404'
|
$ref: './controllers/AuthorController.yaml#/components/responses/author404'
|
||||||
|
/api/libraries:
|
||||||
|
get:
|
||||||
|
operationId: getLibraries
|
||||||
|
summary: Get all libraries on server
|
||||||
|
tags:
|
||||||
|
- Libraries
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: getLibraries OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: './objects/Library.yaml#/components/schemas/library'
|
||||||
tags:
|
tags:
|
||||||
- name: Authors
|
- name: Authors
|
||||||
description: Author endpoints
|
description: Author endpoints
|
||||||
|
- name: Libraries
|
||||||
|
description: Library endpoints
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue