mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-15 05:41:34 +00:00
Initial CollectionController OpenAPI spec
This includes a large `components.js` taken from initial efforts of benonymity. This file still needs to be cleaned up but is provided as a starting point.
This commit is contained in:
parent
4c11ca5a55
commit
f41b1b6469
5 changed files with 4105 additions and 11 deletions
|
|
@ -451,6 +451,31 @@ class LibraryController {
|
|||
* @param {*} req
|
||||
* @param {*} res
|
||||
*/
|
||||
/**
|
||||
* @openapi
|
||||
* /api/libraries/{id}/collections:
|
||||
* get:
|
||||
* operationId: getLibraryCollections
|
||||
* summary: Get all collections in a library
|
||||
* tags:
|
||||
* - Library
|
||||
* parameters:
|
||||
* - name: id
|
||||
* in: path
|
||||
* description: Library ID
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Collection created successfully
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: array
|
||||
* items:
|
||||
* $ref: '#/components/schemas/collectionExpanded'
|
||||
*/
|
||||
async getCollectionsForLibrary(req, res) {
|
||||
const include = (req.query.include || '').split(',').map(v => v.trim().toLowerCase()).filter(v => !!v)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue