Fix: series issues

This commit is contained in:
Nicholas Wallace 2024-05-20 02:02:03 +00:00
parent 6a9f4db57a
commit 8c40fa5fdf
4 changed files with 70 additions and 37 deletions

View file

@ -17,6 +17,7 @@ paths:
schema: schema:
$ref: '../objects/entities/Series.yaml#/components/schemas/seriesId' $ref: '../objects/entities/Series.yaml#/components/schemas/seriesId'
get: get:
operationId: getSeries
tags: tags:
- Series - Series
summary: Get series summary: Get series
@ -33,7 +34,7 @@ paths:
type: string type: string
description: A comma separated list of what to include with the series. description: A comma separated list of what to include with the series.
example: 'progress,rssfeed' example: 'progress,rssfeed'
enum: ['progress', 'rssfeed'] enum: ['progress', 'rssfeed', 'progress,rssfeed', 'rssfeed,progress']
responses: responses:
'200': '200':
description: OK description: OK
@ -44,6 +45,7 @@ paths:
'404': '404':
$ref: '#/components/responses/series404' $ref: '#/components/responses/series404'
patch: patch:
operationId: updateSeries
tags: tags:
- Series - Series
summary: Update series summary: Update series

View file

@ -105,14 +105,13 @@ components:
seriesWithProgressAndRSS: seriesWithProgressAndRSS:
type: object type: object
description: A series object which includes the name and progress of the series. description: A series object which includes the name and progress of the series.
properties: oneOf:
oneOf: - $ref: '#/components/schemas/series'
- $ref: '#/components/schemas/series' - type: object
- type: object properties:
properties: progress:
progress: $ref: '#/components/schemas/seriesProgress'
$ref: '#/components/schemas/seriesProgress' rssFeed:
rssFeed: description: The RSS feed for the series.
description: The RSS feed for the series. type: string
type: string example: 'TBD'
example: 'TBD'

View file

@ -24,6 +24,10 @@
{ {
"name": "Libraries", "name": "Libraries",
"description": "Library endpoints" "description": "Library endpoints"
},
{
"name": "Series",
"description": "Series endpoints"
} }
], ],
"paths": { "paths": {
@ -885,6 +889,7 @@
} }
], ],
"get": { "get": {
"operationId": "getSeries",
"tags": [ "tags": [
"Series" "Series"
], ],
@ -904,7 +909,9 @@
"example": "progress,rssfeed", "example": "progress,rssfeed",
"enum": [ "enum": [
"progress", "progress",
"rssfeed" "rssfeed",
"progress,rssfeed",
"rssfeed,progress"
] ]
} }
} }
@ -929,6 +936,7 @@
} }
}, },
"patch": { "patch": {
"operationId": "updateSeries",
"tags": [ "tags": [
"Series" "Series"
], ],
@ -1772,30 +1780,6 @@
} }
} }
}, },
"seriesWithProgressAndRSS": {
"type": "object",
"description": "A series object which includes the name and progress of the series.",
"properties": {
"oneOf": [
{
"$ref": "#/components/schemas/series"
},
{
"type": "object",
"properties": {
"progress": {
"$ref": "#/components/schemas/seriesProgress"
},
"rssFeed": {
"description": "The RSS feed for the series.",
"type": "string",
"example": "TBD"
}
}
}
]
}
},
"seriesDescription": { "seriesDescription": {
"description": "A description for the series. Will be null if there is none.", "description": "A description for the series. Will be null if there is none.",
"type": "string", "type": "string",
@ -1822,6 +1806,52 @@
"$ref": "#/components/schemas/updatedAt" "$ref": "#/components/schemas/updatedAt"
} }
} }
},
"seriesProgress": {
"type": "object",
"description": "The user's progress of a series.",
"properties": {
"libraryItemIds": {
"description": "The IDs of the library items in the series.",
"type": "array",
"items": {
"$ref": "#/components/schemas/libraryItemId"
}
},
"libraryItemIdsFinished": {
"description": "The IDs of the library items in the series that are finished.",
"type": "array",
"items": {
"$ref": "#/components/schemas/libraryItemId"
}
},
"isFinished": {
"description": "Whether the series is finished.",
"type": "boolean"
}
}
},
"seriesWithProgressAndRSS": {
"type": "object",
"description": "A series object which includes the name and progress of the series.",
"oneOf": [
{
"$ref": "#/components/schemas/series"
},
{
"type": "object",
"properties": {
"progress": {
"$ref": "#/components/schemas/seriesProgress"
},
"rssFeed": {
"description": "The RSS feed for the series.",
"type": "string",
"example": "TBD"
}
}
}
]
} }
}, },
"responses": { "responses": {

View file

@ -40,3 +40,5 @@ tags:
description: Author endpoints description: Author endpoints
- name: Libraries - name: Libraries
description: Library endpoints description: Library endpoints
- name: Series
description: Series endpoints