diff --git a/docs/controllers/LibraryController.yaml b/docs/controllers/LibraryController.yaml index eff6389ee..df044f2ce 100644 --- a/docs/controllers/LibraryController.yaml +++ b/docs/controllers/LibraryController.yaml @@ -378,3 +378,58 @@ paths: '404': $ref: '#/components/responses/library404' + /api/libraries/{id}/series/{seriesId}: + parameters: + - name: id + in: path + description: The ID of the library. + required: true + schema: + $ref: '../objects/Library.yaml#/components/schemas/libraryId' + - name: seriesId + in: path + description: The ID of the series. + required: true + schema: + $ref: '../objects/entities/Series.yaml#/components/schemas/seriesId' + get: + operationId: getLibrarySeriesById + summary: Get single series in library + description: Get a single series in a library by ID on server. + tags: + - Libraries + requestBody: + required: false + description: The filters to apply to the requested library series. + content: + application/json: + schema: + type: object + properties: + limit: + $ref: '../schemas.yaml#/components/schemas/limit' + page: + $ref: '../schemas.yaml#/components/schemas/page' + sort: + description: The field to sort by from the request. + type: string + enum: ['name', 'numBooks', 'totalDuration', 'addedAt', 'lastBookAdded', 'lastBookUpdated'] + example: 'numBooks' + default: 'name' + desc: + $ref: '../schemas.yaml#/components/schemas/sortDesc' + filter: + $ref: '#/components/schemas/libraryFilter' + minified: + $ref: '../schemas.yaml#/components/schemas/minified' + include: + $ref: '#/components/schemas/libraryInclude' + responses: + '200': + description: getLibrarySeriesById OK + content: + application/json: + schema: + $ref: '../objects/entities/Series.yaml#/components/schemas/seriesWithProgressAndRSS' + '404': + $ref: '#/components/responses/library404' diff --git a/docs/controllers/SeriesController.yaml b/docs/controllers/SeriesController.yaml index 1fd999ed4..233528a89 100644 --- a/docs/controllers/SeriesController.yaml +++ b/docs/controllers/SeriesController.yaml @@ -18,10 +18,11 @@ paths: $ref: '../objects/entities/Series.yaml#/components/schemas/seriesId' get: operationId: getSeries + deprecated: true tags: - Series summary: Get series - description: Get a series by ID. + description: Get a series by ID. This endpoint is deprecated and will be removed in the future. Use `/api/libraries/{id}/series/{seriesId}` instead. requestBody: required: false description: A comma separated list of what to include with the series. diff --git a/docs/openapi.json b/docs/openapi.json index 8d993d7a6..6930f90df 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -876,6 +876,96 @@ } } }, + "/api/libraries/{id}/series/{seriesId}": { + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the library.", + "required": true, + "schema": { + "$ref": "#/components/schemas/libraryId" + } + }, + { + "name": "seriesId", + "in": "path", + "description": "The ID of the series.", + "required": true, + "schema": { + "$ref": "#/components/schemas/seriesId" + } + } + ], + "get": { + "operationId": "getLibrarySeriesById", + "summary": "Get single series in library", + "description": "Get a single series in a library by ID on server.", + "tags": [ + "Libraries" + ], + "requestBody": { + "required": false, + "description": "The filters to apply to the requested library series.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "limit": { + "$ref": "#/components/schemas/limit" + }, + "page": { + "$ref": "#/components/schemas/page" + }, + "sort": { + "description": "The field to sort by from the request.", + "type": "string", + "enum": [ + "name", + "numBooks", + "totalDuration", + "addedAt", + "lastBookAdded", + "lastBookUpdated" + ], + "example": "numBooks", + "default": "name" + }, + "desc": { + "$ref": "#/components/schemas/sortDesc" + }, + "filter": { + "$ref": "#/components/schemas/libraryFilter" + }, + "minified": { + "$ref": "#/components/schemas/minified" + }, + "include": { + "$ref": "#/components/schemas/libraryInclude" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "getLibrarySeriesById OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/seriesWithProgressAndRSS" + } + } + } + }, + "404": { + "$ref": "#/components/responses/library404" + } + } + } + }, "/api/series/{id}": { "parameters": [ { @@ -890,11 +980,12 @@ ], "get": { "operationId": "getSeries", + "deprecated": true, "tags": [ "Series" ], "summary": "Get series", - "description": "Get a series by ID.", + "description": "Get a series by ID. This endpoint is deprecated and will be removed in the future. Use `/api/libraries/{id}/series/{seriesId}` instead.", "requestBody": { "required": false, "description": "A comma separated list of what to include with the series.", diff --git a/docs/root.yaml b/docs/root.yaml index c8bc23ea0..3c40f8dc4 100644 --- a/docs/root.yaml +++ b/docs/root.yaml @@ -33,6 +33,8 @@ paths: $ref: './controllers/LibraryController.yaml#/paths/~1api~1libraries~1{id}~1issues' /api/libraries/{id}/series: $ref: './controllers/LibraryController.yaml#/paths/~1api~1libraries~1{id}~1series' + /api/libraries/{id}/series/{seriesId}: + $ref: './controllers/LibraryController.yaml#/paths/~1api~1libraries~1{id}~1series~1{seriesId}' /api/series/{id}: $ref: './controllers/SeriesController.yaml#/paths/~1api~1series~1{id}' tags: