From bd32521cb2185fa8b6f0fac7b93672505ed6eced Mon Sep 17 00:00:00 2001 From: Petitminion Date: Sun, 27 Apr 2025 12:08:30 +0200 Subject: [PATCH] schema --- api/funkwhale_api/common/schema.yml | 223 ++++++++++++++-------------- 1 file changed, 110 insertions(+), 113 deletions(-) diff --git a/api/funkwhale_api/common/schema.yml b/api/funkwhale_api/common/schema.yml index 81bee930d..38d2fc03c 100644 --- a/api/funkwhale_api/common/schema.yml +++ b/api/funkwhale_api/common/schema.yml @@ -6929,7 +6929,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v1/playlists/{id}/: + /api/v1/playlists/{uuid}/: get: operationId: get_playlist parameters: @@ -6941,10 +6941,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -6972,10 +6972,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7018,10 +7018,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7063,10 +7063,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7076,7 +7076,7 @@ paths: responses: '204': description: No response body - /api/v1/playlists/{id}/add/: + /api/v1/playlists/{uuid}/add/: post: operationId: add_to_playlist parameters: @@ -7088,10 +7088,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7123,7 +7123,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v1/playlists/{id}/albums/: + /api/v1/playlists/{uuid}/albums/: get: operationId: get_playlist_albums parameters: @@ -7135,10 +7135,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7155,7 +7155,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v1/playlists/{id}/artists/: + /api/v1/playlists/{uuid}/artists/: get: operationId: get_playlist_artits parameters: @@ -7167,10 +7167,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7187,7 +7187,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v1/playlists/{id}/clear/: + /api/v1/playlists/{uuid}/clear/: delete: operationId: clear_playlist parameters: @@ -7199,10 +7199,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7212,7 +7212,7 @@ paths: responses: '204': description: No response body - /api/v1/playlists/{id}/move/: + /api/v1/playlists/{uuid}/move/: post: operationId: reorder_track_in_playlist parameters: @@ -7224,10 +7224,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7259,7 +7259,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v1/playlists/{id}/remove/: + /api/v1/playlists/{uuid}/remove/: post: operationId: remove_from_playlist_2 parameters: @@ -7271,10 +7271,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7317,10 +7317,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -7330,7 +7330,7 @@ paths: responses: '204': description: No response body - /api/v1/playlists/{id}/tracks/: + /api/v1/playlists/{uuid}/tracks/: get: operationId: get_playlist_tracks parameters: @@ -7349,12 +7349,6 @@ paths: enum: - json - xspf - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this playlist. - required: true - in: query name: name schema: @@ -7397,6 +7391,12 @@ paths: name: track schema: type: integer + - in: path + name: uuid + schema: + type: string + format: uuid + required: true tags: - playlists security: @@ -16474,7 +16474,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v2/playlists/{id}/: + /api/v2/playlists/{uuid}/: get: operationId: get_playlist_2 parameters: @@ -16486,10 +16486,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16517,10 +16517,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16563,10 +16563,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16608,10 +16608,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16621,7 +16621,7 @@ paths: responses: '204': description: No response body - /api/v2/playlists/{id}/add/: + /api/v2/playlists/{uuid}/add/: post: operationId: add_to_playlist_2 parameters: @@ -16633,10 +16633,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16668,7 +16668,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v2/playlists/{id}/albums/: + /api/v2/playlists/{uuid}/albums/: get: operationId: get_playlist_albums_2 parameters: @@ -16680,10 +16680,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16700,7 +16700,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v2/playlists/{id}/artists/: + /api/v2/playlists/{uuid}/artists/: get: operationId: get_playlist_artits_2 parameters: @@ -16712,10 +16712,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16732,7 +16732,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v2/playlists/{id}/clear/: + /api/v2/playlists/{uuid}/clear/: delete: operationId: clear_playlist_2 parameters: @@ -16744,10 +16744,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16757,7 +16757,7 @@ paths: responses: '204': description: No response body - /api/v2/playlists/{id}/move/: + /api/v2/playlists/{uuid}/move/: post: operationId: reorder_track_in_playlist_2 parameters: @@ -16769,10 +16769,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16804,7 +16804,7 @@ paths: schema: $ref: '#/components/schemas/Playlist' description: '' - /api/v2/playlists/{id}/remove/: + /api/v2/playlists/{uuid}/remove/: post: operationId: remove_from_playlist_4 parameters: @@ -16816,10 +16816,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16862,10 +16862,10 @@ paths: - json - xspf - in: path - name: id + name: uuid schema: - type: integer - description: A unique integer value identifying this playlist. + type: string + format: uuid required: true tags: - playlists @@ -16875,7 +16875,7 @@ paths: responses: '204': description: No response body - /api/v2/playlists/{id}/tracks/: + /api/v2/playlists/{uuid}/tracks/: get: operationId: get_playlist_tracks_2 parameters: @@ -16894,12 +16894,6 @@ paths: enum: - json - xspf - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this playlist. - required: true - in: query name: name schema: @@ -16942,6 +16936,12 @@ paths: name: track schema: type: integer + - in: path + name: uuid + schema: + type: string + format: uuid + required: true tags: - playlists security: @@ -20659,32 +20659,18 @@ components: format: date-time readOnly: true nullable: true - type: - type: string - readOnly: true - object: - oneOf: - - $ref: '#/components/schemas/Artist' - - $ref: '#/components/schemas/Album' - - $ref: '#/components/schemas/Track' - - $ref: '#/components/schemas/APIActor' - - $ref: '#/components/schemas/Channel' - - $ref: '#/components/schemas/Playlist' - readOnly: true required: - actor - creation_date - detail - fetch_date - id - - object - status - - type - url FetchRequest: type: object properties: - object_uri: + object: type: string writeOnly: true minLength: 1 @@ -20693,7 +20679,7 @@ components: writeOnly: true default: false required: - - object_uri + - object FetchStatusEnum: enum: - pending @@ -24813,8 +24799,13 @@ components: Playlist: type: object properties: - id: - type: integer + uuid: + type: string + format: uuid + readOnly: true + fid: + type: string + format: uri readOnly: true name: type: string @@ -24851,16 +24842,22 @@ components: type: string nullable: true maxLength: 5000 + library: + type: string + format: uri + readOnly: true required: - actor - album_covers - creation_date - duration - - id + - fid - is_playable + - library - modification_date - name - tracks_count + - uuid PlaylistAddManyRequest: type: object properties: