Update library responses

This commit is contained in:
Nicholas Wallace 2024-05-12 07:13:38 +00:00
parent 2621d04e4b
commit 9f6ef2dea3
2 changed files with 14 additions and 17 deletions

View file

@ -59,7 +59,7 @@ components:
$ref: '../objects/Library.yaml#/components/schemas/librarySettings' $ref: '../objects/Library.yaml#/components/schemas/librarySettings'
libraryId: libraryId:
name: id name: id
in: query in: path
description: The ID of the library. description: The ID of the library.
required: true required: true
schema: schema:
@ -74,6 +74,12 @@ components:
schema: schema:
$ref: '../objects/Library.yaml#/components/schemas/librarySettings' $ref: '../objects/Library.yaml#/components/schemas/librarySettings'
responses: responses:
library200:
description: Library found.
content:
application/json:
schema:
$ref: '../objects/Library.yaml#/components/schemas/library'
library404: library404:
description: Library not found. description: Library not found.
content: content:

View file

@ -182,11 +182,9 @@ paths:
- $ref: './controllers/LibraryController.yaml#/components/parameters/librarySettings' - $ref: './controllers/LibraryController.yaml#/components/parameters/librarySettings'
responses: responses:
'200': '200':
description: createLibrary OK $ref: './controllers/LibraryController.yaml#/components/responses/library200'
content: '400':
application/json: $ref: './controllers/LibraryController.yaml#/components/responses/library404'
schema:
$ref: './objects/Library.yaml#/components/schemas/library'
/api/libraries/{id}: /api/libraries/{id}:
get: get:
operationId: getLibraryById operationId: getLibraryById
@ -197,11 +195,7 @@ paths:
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId'
responses: responses:
'200': '200':
description: getLibraryById OK $ref: './controllers/LibraryController.yaml#/components/responses/library200'
content:
application/json:
schema:
$ref: './objects/Library.yaml#/components/schemas/library'
'404': '404':
$ref: './controllers/LibraryController.yaml#/components/responses/library404' $ref: './controllers/LibraryController.yaml#/components/responses/library404'
patch: patch:
@ -210,6 +204,7 @@ paths:
tags: tags:
- Libraries - Libraries
parameters: parameters:
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId'
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryName' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryName'
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryFolders' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryFolders'
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryDisplayOrder' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryDisplayOrder'
@ -218,11 +213,7 @@ paths:
- $ref: './controllers/LibraryController.yaml#/components/parameters/librarySettings' - $ref: './controllers/LibraryController.yaml#/components/parameters/librarySettings'
responses: responses:
'200': '200':
description: updateLibraryById OK $ref: './controllers/LibraryController.yaml#/components/responses/library200'
content:
application/json:
schema:
$ref: './objects/Library.yaml#/components/schemas/library'
'404': '404':
$ref: './controllers/LibraryController.yaml#/components/responses/library404' $ref: './controllers/LibraryController.yaml#/components/responses/library404'
delete: delete:
@ -234,7 +225,7 @@ paths:
- $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId'
responses: responses:
'200': '200':
$ref: '#/components/responses/ok200' $ref: './controllers/LibraryController.yaml#/components/responses/library200'
'404': '404':
$ref: './controllers/LibraryController.yaml#/components/responses/library404' $ref: './controllers/LibraryController.yaml#/components/responses/library404'
tags: tags: