From 9b3cb4ed33e05062e2aef445a9a28a77cba67522 Mon Sep 17 00:00:00 2001 From: Vito0912 <86927734+Vito0912@users.noreply.github.com> Date: Tue, 30 Jul 2024 17:34:04 +0200 Subject: [PATCH] Fixed some minor bugs and added to root --- docs/controllers/LibraryItemController.yaml | 8 +- docs/controllers/MeController.yaml | 2 + docs/objects/entities/PlaybackSession.yaml | 120 ++++++++++---------- docs/openapi.json | Bin 298894 -> 316108 bytes docs/root.yaml | 2 + 5 files changed, 72 insertions(+), 60 deletions(-) create mode 100644 docs/controllers/MeController.yaml diff --git a/docs/controllers/LibraryItemController.yaml b/docs/controllers/LibraryItemController.yaml index 60a7699a1..6a3a34670 100644 --- a/docs/controllers/LibraryItemController.yaml +++ b/docs/controllers/LibraryItemController.yaml @@ -40,7 +40,7 @@ paths: description: TODO oneOf: - $ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItem' - /api/items/{id}/play: + /api/items/{id}/play/{episodeId}: parameters: - name: id in: path @@ -48,6 +48,12 @@ paths: required: true schema: $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: operationId: playLibraryItem summary: Play a library item. diff --git a/docs/controllers/MeController.yaml b/docs/controllers/MeController.yaml new file mode 100644 index 000000000..cf62b8460 --- /dev/null +++ b/docs/controllers/MeController.yaml @@ -0,0 +1,2 @@ +paths: + diff --git a/docs/objects/entities/PlaybackSession.yaml b/docs/objects/entities/PlaybackSession.yaml index 0867e6d4e..17004fb9f 100644 --- a/docs/objects/entities/PlaybackSession.yaml +++ b/docs/objects/entities/PlaybackSession.yaml @@ -5,65 +5,67 @@ components: type: string format: uuid playbackSession: - id: - $ref: '#/components/schemas/playbackSessionId' - userId: - $ref: './User.yaml#/components/schemas/userId' - libraryId: - $ref: '../Library.yaml#/components/schemas/libraryId' - libraryItemId: - $ref: '../LibraryItem.yaml#/components/schemas/libraryItemId' - episodeId: - $ref: '../mediaTypes/Podcast.yaml#/components/schemas/episodeId' - nullable: true - mediaType: - $ref: '../../controllers/LibraryItemController.yaml#/components/schemas/libraryMediaType' - mediaMetadata: - description: The metadata of the media. - oneOf: - - $ref: '../mediaTypes/Book.yaml#/components/schemas/bookMinified' - - $ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastMinified' - chapters: - description: The chapters of the media. - type: array - items: - $ref: '../metadata/BookMetadata.yaml#/components/schemas/bookChapter' - displayTitle: - description: The display title of the media. - type: string - displayAuthor: - description: The display author of the media. - type: string - coverPath: - $ref: '../Book.yaml#/components/schemas/bookCoverPath' - duration: - $ref: '../schemas.yaml#/components/schemas/durationSec' - playMethod: - type: integer - description: The method used to play the media. 0 = Direct play, 1 = Direct Stream, 2 = Transcode, 3 = Local - mediaPlayer: - type: string - description: The media player used to play the media. - deviceInfo: - $ref: './Device.yaml#/components/schemas/deviceInfo' - serverVersion: - $ref: '../schemas.yaml#/components/schemas/serverVersion' - date: - description: TODO - type: String - dayOfWeek: - description: TODO - type: String - timeListening: - $ref: '../schemas.yaml#/components/schemas/durationSec' - startTime: - $ref: '../schemas.yaml#/components/schemas/durationSec' - currentTime: - $ref: '../schemas.yaml#/components/schemas/durationSec' - createdAt: - $ref: '../schemas.yaml#/components/schemas/createdAt' - updatedAt: - $ref: '../schemas.yaml#/components/schemas/updatedAt' + type: object + description: A playback session object. + properties: + id: + $ref: '#/components/schemas/playbackSessionId' + userId: + $ref: './User.yaml#/components/schemas/userId' + libraryId: + $ref: '../Library.yaml#/components/schemas/libraryId' + libraryItemId: + $ref: '../LibraryItem.yaml#/components/schemas/libraryItemId' + episodeId: + $ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastId' + mediaType: + $ref: '../mediaTypes/media.yaml#/components/schemas/mediaType' + mediaMetadata: + description: The metadata of the media. + oneOf: + - $ref: '../mediaTypes/Book.yaml#/components/schemas/bookMinified' + - $ref: '../mediaTypes/Podcast.yaml#/components/schemas/Podcast' + chapters: + description: The chapters of the media. + type: array + items: + $ref: '../metadata/BookMetadata.yaml#/components/schemas/bookChapter' + displayTitle: + description: The display title of the media. + type: string + displayAuthor: + description: The display author of the media. + type: string + coverPath: + $ref: '../mediaTypes/Book.yaml#/components/schemas/bookCoverPath' + duration: + $ref: '../../schemas.yaml#/components/schemas/durationSec' + playMethod: + type: integer + description: The method used to play the media. 0 = Direct play, 1 = Direct Stream, 2 = Transcode, 3 = Local + mediaPlayer: + type: string + description: The media player used to play the media. + deviceInfo: + $ref: './Device.yaml#/components/schemas/deviceInfo' + serverVersion: + $ref: '../../schemas.yaml#/components/schemas/serverVersion' + date: + description: TODO + type: string + dayOfWeek: + description: TODO + type: string + timeListening: + $ref: '../../schemas.yaml#/components/schemas/durationSec' + startTime: + $ref: '../../schemas.yaml#/components/schemas/durationSec' + currentTime: + $ref: '../../schemas.yaml#/components/schemas/durationSec' + createdAt: + $ref: '../../schemas.yaml#/components/schemas/createdAt' + updatedAt: + $ref: '../../schemas.yaml#/components/schemas/updatedAt' playbackSessionExpanded: description: Expanded playback session schema. allOf: diff --git a/docs/openapi.json b/docs/openapi.json index 9e2e04872117b71a0216be6e3a46df4111b1e161..9c2d854dd463ed36109bfdceab048129adb66f7d 100644 GIT binary patch delta 3045 zcmb7Ge@xtG8GnC#3)h48;P_df@TEmcDdX;FSNr3jhcav{rC@1m>yJ`7y28qVaNR)3 zcElNtiI;=7^2uD@c2G1f zKF{ZQKF{-pFFSAiFe~&le?{ynR4u^*6s3vmwJz4j&au;MX!=jDan8rC zR*tQ=PdB9tCm(a>f~+&qPz^DEBsB>{*8vzB{S-| z={($P;O^9xm|ewxomzivUU;*aG<-hTbi2PQRDf8M+wEtarGat0$c}5%^PvzZt zy{z9lpn(qRCkq`c$jECfJ}e)>RK3hCrDK;cCi5qu%s6ZK;DX$$V=IPxi0@GoO-_W~ zmeu3?WdYm`auZq%QLHB3@xn~y2eabl+Q{r_a(RGtVD{I%1W}Kyc<{{NM=Oh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FFfS7qZmk|p`#PkhCjB=CL6lrZgw~ghWGyrW{ B5EuXe diff --git a/docs/root.yaml b/docs/root.yaml index cc6cf7e11..b920e09a1 100644 --- a/docs/root.yaml +++ b/docs/root.yaml @@ -83,6 +83,8 @@ paths: $ref: './controllers/AuthController.yaml#/paths/~1logout' /api/items/{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: - name: Authors description: Author endpoints