Fixed some minor bugs and added to root

This commit is contained in:
Vito0912 2024-07-30 17:34:04 +02:00
parent 7ef2eed2ad
commit 9b3cb4ed33
5 changed files with 72 additions and 60 deletions

View file

@ -40,7 +40,7 @@ paths:
description: TODO description: TODO
oneOf: oneOf:
- $ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItem' - $ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItem'
/api/items/{id}/play: /api/items/{id}/play/{episodeId}:
parameters: parameters:
- name: id - name: id
in: path in: path
@ -48,6 +48,12 @@ paths:
required: true required: true
schema: schema:
$ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItemId' $ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItemId'
- name: episodeId
in: path
description: The ID of the episode to play.
required: false
schema:
$ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId'
post: post:
operationId: playLibraryItem operationId: playLibraryItem
summary: Play a library item. summary: Play a library item.

View file

@ -0,0 +1,2 @@
paths:

View file

@ -5,65 +5,67 @@ components:
type: string type: string
format: uuid format: uuid
playbackSession: playbackSession:
id: type: object
$ref: '#/components/schemas/playbackSessionId' description: A playback session object.
userId: properties:
$ref: './User.yaml#/components/schemas/userId' id:
libraryId: $ref: '#/components/schemas/playbackSessionId'
$ref: '../Library.yaml#/components/schemas/libraryId' userId:
libraryItemId: $ref: './User.yaml#/components/schemas/userId'
$ref: '../LibraryItem.yaml#/components/schemas/libraryItemId' libraryId:
episodeId: $ref: '../Library.yaml#/components/schemas/libraryId'
$ref: '../mediaTypes/Podcast.yaml#/components/schemas/episodeId' libraryItemId:
nullable: true $ref: '../LibraryItem.yaml#/components/schemas/libraryItemId'
mediaType: episodeId:
$ref: '../../controllers/LibraryItemController.yaml#/components/schemas/libraryMediaType' $ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastId'
mediaMetadata: mediaType:
description: The metadata of the media. $ref: '../mediaTypes/media.yaml#/components/schemas/mediaType'
oneOf: mediaMetadata:
- $ref: '../mediaTypes/Book.yaml#/components/schemas/bookMinified' description: The metadata of the media.
- $ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastMinified' oneOf:
chapters: - $ref: '../mediaTypes/Book.yaml#/components/schemas/bookMinified'
description: The chapters of the media. - $ref: '../mediaTypes/Podcast.yaml#/components/schemas/Podcast'
type: array chapters:
items: description: The chapters of the media.
$ref: '../metadata/BookMetadata.yaml#/components/schemas/bookChapter' type: array
displayTitle: items:
description: The display title of the media. $ref: '../metadata/BookMetadata.yaml#/components/schemas/bookChapter'
type: string displayTitle:
displayAuthor: description: The display title of the media.
description: The display author of the media. type: string
type: string displayAuthor:
coverPath: description: The display author of the media.
$ref: '../Book.yaml#/components/schemas/bookCoverPath' type: string
duration: coverPath:
$ref: '../schemas.yaml#/components/schemas/durationSec' $ref: '../mediaTypes/Book.yaml#/components/schemas/bookCoverPath'
playMethod: duration:
type: integer $ref: '../../schemas.yaml#/components/schemas/durationSec'
description: The method used to play the media. 0 = Direct play, 1 = Direct Stream, 2 = Transcode, 3 = Local playMethod:
mediaPlayer: type: integer
type: string description: The method used to play the media. 0 = Direct play, 1 = Direct Stream, 2 = Transcode, 3 = Local
description: The media player used to play the media. mediaPlayer:
deviceInfo: type: string
$ref: './Device.yaml#/components/schemas/deviceInfo' description: The media player used to play the media.
serverVersion: deviceInfo:
$ref: '../schemas.yaml#/components/schemas/serverVersion' $ref: './Device.yaml#/components/schemas/deviceInfo'
date: serverVersion:
description: TODO $ref: '../../schemas.yaml#/components/schemas/serverVersion'
type: String date:
dayOfWeek: description: TODO
description: TODO type: string
type: String dayOfWeek:
timeListening: description: TODO
$ref: '../schemas.yaml#/components/schemas/durationSec' type: string
startTime: timeListening:
$ref: '../schemas.yaml#/components/schemas/durationSec' $ref: '../../schemas.yaml#/components/schemas/durationSec'
currentTime: startTime:
$ref: '../schemas.yaml#/components/schemas/durationSec' $ref: '../../schemas.yaml#/components/schemas/durationSec'
createdAt: currentTime:
$ref: '../schemas.yaml#/components/schemas/createdAt' $ref: '../../schemas.yaml#/components/schemas/durationSec'
updatedAt: createdAt:
$ref: '../schemas.yaml#/components/schemas/updatedAt' $ref: '../../schemas.yaml#/components/schemas/createdAt'
updatedAt:
$ref: '../../schemas.yaml#/components/schemas/updatedAt'
playbackSessionExpanded: playbackSessionExpanded:
description: Expanded playback session schema. description: Expanded playback session schema.
allOf: allOf:

Binary file not shown.

View file

@ -83,6 +83,8 @@ paths:
$ref: './controllers/AuthController.yaml#/paths/~1logout' $ref: './controllers/AuthController.yaml#/paths/~1logout'
/api/items/{id}: /api/items/{id}:
$ref: './controllers/LibraryItemController.yaml#/paths/~1api~1items~1{id}' $ref: './controllers/LibraryItemController.yaml#/paths/~1api~1items~1{id}'
/api/items/{id}/play/{episodeId}:
$ref: './controllers/LibraryItemController.yaml#/paths/~1api~1items~1{id}~1play~1{episodeId}'
tags: tags:
- name: Authors - name: Authors
description: Author endpoints description: Author endpoints