mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-13 04:41:36 +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
|
|
@ -26,6 +26,30 @@ class LibraryItemController {
|
|||
* @param {import('express').Request} req
|
||||
* @param {import('express').Response} res
|
||||
*/
|
||||
/**
|
||||
* @openapi
|
||||
* /api/items/{id}:
|
||||
* get:
|
||||
* summary: Get a library item
|
||||
* tags:
|
||||
* - Items
|
||||
* parameters:
|
||||
* - name: id
|
||||
* in: path
|
||||
* description: Library Item ID
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Got the library item
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/libraryItem'
|
||||
* 400:
|
||||
* description: Invalid collection data
|
||||
*/
|
||||
async findOne(req, res) {
|
||||
const includeEntities = (req.query.include || '').split(',')
|
||||
if (req.query.expanded == 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue