From 632f519cefa0a17f8e8af2184caf99b31961b1a2 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:09:11 -0800 Subject: [PATCH 1/9] Add user_id to swagger for writes --- api/swagger/swagger-v1.yaml | 197 ++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 0b6ebc73..f0960bf2 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -155,6 +155,13 @@ paths: security: - BasicAuth: [] - BearerAuth: [] + parameters: + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -215,6 +222,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -252,6 +265,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Comment deleted successfully @@ -284,6 +303,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Comment reacted successfully @@ -315,6 +340,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Comment unreacted successfully @@ -347,6 +378,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Comment pinned successfully @@ -378,6 +415,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Comment unpinned successfully @@ -410,6 +453,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Comment reported successfully @@ -477,6 +526,13 @@ paths: security: - BasicAuth: [] - BearerAuth: [] + parameters: + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -543,6 +599,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -583,6 +645,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Developer app deleted successfully @@ -906,6 +974,13 @@ paths: security: - BasicAuth: [] - BearerAuth: [] + parameters: + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -1139,6 +1214,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -1263,6 +1344,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Playlist favorited successfully @@ -1294,6 +1381,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Playlist unfavorited successfully @@ -1326,6 +1419,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Playlist reposted successfully @@ -1357,6 +1456,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Playlist unreposted successfully @@ -1572,6 +1677,13 @@ paths: security: - BasicAuth: [] - BearerAuth: [] + parameters: + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -2390,6 +2502,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -2430,6 +2548,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Track deleted successfully @@ -2643,6 +2767,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Track favorited successfully @@ -2674,6 +2804,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Track unfavorited successfully @@ -2839,6 +2975,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Track reposted successfully @@ -2870,6 +3012,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Track unreposted successfully @@ -3243,6 +3391,13 @@ paths: security: - BasicAuth: [] - BearerAuth: [] + parameters: + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -3654,6 +3809,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string requestBody: required: true content: @@ -4351,6 +4512,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: User followed successfully @@ -4382,6 +4549,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: User unfollowed successfully @@ -4612,6 +4785,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: User muted successfully @@ -4643,6 +4822,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: User unmuted successfully @@ -5220,6 +5405,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Subscribed successfully @@ -5251,6 +5442,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Unsubscribed successfully From 47323b86fa2048f54b63662c16a8374c718aa9b4 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:22:47 -0800 Subject: [PATCH 2/9] Genre/mood enums --- api/swagger/swagger-v1.yaml | 95 +++++++++++++++++++++++++++++++++---- api/v1_track.go | 8 ++-- 2 files changed, 90 insertions(+), 13 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index f0960bf2..63dee95c 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -9760,16 +9760,13 @@ components: description: Track title example: "My New Track" genre: - type: string - description: Track genre - example: "Electronic" + $ref: '#/components/schemas/genre' description: type: string description: Track description maxLength: 1000 mood: - type: string - description: Track mood + $ref: '#/components/schemas/mood' tags: type: string description: Comma-separated tags @@ -9828,11 +9825,9 @@ components: description: Track description maxLength: 5000 genre: - type: string - description: Track genre + $ref: '#/components/schemas/genre' mood: - type: string - description: Track mood + $ref: '#/components/schemas/mood' tags: type: string description: Comma-separated tags @@ -10213,6 +10208,88 @@ components: success: type: boolean description: Whether the deactivation was successful + genre: + type: string + description: Music genre + enum: + - Electronic + - Rock + - Metal + - Alternative + - Hip-Hop/Rap + - Experimental + - Punk + - Folk + - Pop + - Ambient + - Soundtrack + - World + - Jazz + - Acoustic + - Funk + - R&B/Soul + - Devotional + - Classical + - Reggae + - Podcasts + - Country + - Spoken Word + - Comedy + - Blues + - Kids + - Audiobooks + - Latin + - Lo-Fi + - Hyperpop + - Dancehall + - Techno + - Trap + - House + - Tech House + - Deep House + - Disco + - Electro + - Jungle + - Progressive House + - Hardstyle + - Glitch Hop + - Trance + - Future Bass + - Future House + - Tropical House + - Downtempo + - Drum & Bass + - Dubstep + - Jersey Club + - Vaporwave + - Moombahton + mood: + type: string + description: Music mood + enum: + - Peaceful + - Romantic + - Sentimental + - Tender + - Easygoing + - Yearning + - Sophisticated + - Sensual + - Cool + - Gritty + - Melancholy + - Serious + - Brooding + - Fiery + - Defiant + - Aggressive + - Rowdy + - Excited + - Energizing + - Empowering + - Stirring + - Upbeat + - Other responses: ParseError: description: When a mask can't be parsed diff --git a/api/v1_track.go b/api/v1_track.go index 0e593aa9..7978af94 100644 --- a/api/v1_track.go +++ b/api/v1_track.go @@ -115,9 +115,9 @@ type DDEXRightsController struct { type CreateTrackRequest struct { TrackId *string `json:"track_id,omitempty"` Title string `json:"title" validate:"required,min=1"` - Genre string `json:"genre" validate:"required,min=1"` + Genre string `json:"genre" validate:"required,oneof='Electronic' 'Rock' 'Metal' 'Alternative' 'Hip-Hop/Rap' 'Experimental' 'Punk' 'Folk' 'Pop' 'Ambient' 'Soundtrack' 'World' 'Jazz' 'Acoustic' 'Funk' 'R&B/Soul' 'Devotional' 'Classical' 'Reggae' 'Podcasts' 'Country' 'Spoken Word' 'Comedy' 'Blues' 'Kids' 'Audiobooks' 'Latin' 'Lo-Fi' 'Hyperpop' 'Dancehall' 'Techno' 'Trap' 'House' 'Tech House' 'Deep House' 'Disco' 'Electro' 'Jungle' 'Progressive House' 'Hardstyle' 'Glitch Hop' 'Trance' 'Future Bass' 'Future House' 'Tropical House' 'Downtempo' 'Drum & Bass' 'Dubstep' 'Jersey Club' 'Vaporwave' 'Moombahton'"` Description *string `json:"description,omitempty" validate:"omitempty,max=1000"` - Mood *string `json:"mood,omitempty"` + Mood *string `json:"mood,omitempty" validate:"omitempty,oneof='Peaceful' 'Romantic' 'Sentimental' 'Tender' 'Easygoing' 'Yearning' 'Sophisticated' 'Sensual' 'Cool' 'Gritty' 'Melancholy' 'Serious' 'Brooding' 'Fiery' 'Defiant' 'Aggressive' 'Rowdy' 'Excited' 'Energizing' 'Empowering' 'Stirring' 'Upbeat' 'Other'"` Tags *string `json:"tags,omitempty"` License *string `json:"license,omitempty"` Isrc *string `json:"isrc,omitempty"` @@ -157,8 +157,8 @@ type CreateTrackRequest struct { type UpdateTrackRequest struct { Title *string `json:"title,omitempty" validate:"omitempty,min=1"` Description *string `json:"description,omitempty" validate:"omitempty,max=1000"` - Genre *string `json:"genre,omitempty" validate:"omitempty,min=1"` - Mood *string `json:"mood,omitempty"` + Genre *string `json:"genre,omitempty" validate:"omitempty,oneof='Electronic' 'Rock' 'Metal' 'Alternative' 'Hip-Hop/Rap' 'Experimental' 'Punk' 'Folk' 'Pop' 'Ambient' 'Soundtrack' 'World' 'Jazz' 'Acoustic' 'Funk' 'R&B/Soul' 'Devotional' 'Classical' 'Reggae' 'Podcasts' 'Country' 'Spoken Word' 'Comedy' 'Blues' 'Kids' 'Audiobooks' 'Latin' 'Lo-Fi' 'Hyperpop' 'Dancehall' 'Techno' 'Trap' 'House' 'Tech House' 'Deep House' 'Disco' 'Electro' 'Jungle' 'Progressive House' 'Hardstyle' 'Glitch Hop' 'Trance' 'Future Bass' 'Future House' 'Tropical House' 'Downtempo' 'Drum & Bass' 'Dubstep' 'Jersey Club' 'Vaporwave' 'Moombahton'"` + Mood *string `json:"mood,omitempty" validate:"omitempty,oneof='Peaceful' 'Romantic' 'Sentimental' 'Tender' 'Easygoing' 'Yearning' 'Sophisticated' 'Sensual' 'Cool' 'Gritty' 'Melancholy' 'Serious' 'Brooding' 'Fiery' 'Defiant' 'Aggressive' 'Rowdy' 'Excited' 'Energizing' 'Empowering' 'Stirring' 'Upbeat' 'Other'"` Tags *string `json:"tags,omitempty"` License *string `json:"license,omitempty"` Isrc *string `json:"isrc,omitempty"` From d5a13d921e66994dc5dc73b8d421809d12d631b4 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:30:03 -0800 Subject: [PATCH 3/9] request body to not have name conflict --- api/swagger/swagger-v1.yaml | 72 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 63dee95c..5f923540 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -167,7 +167,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_comment_request' + $ref: '#/components/schemas/create_comment_request_body' responses: "201": description: Comment created successfully @@ -233,7 +233,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/update_comment_request' + $ref: '#/components/schemas/update_comment_request_body' responses: "200": description: Comment updated successfully @@ -538,7 +538,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_developer_app_request' + $ref: '#/components/schemas/create_developer_app_request_body' responses: "201": description: Developer app created successfully @@ -610,7 +610,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/update_developer_app_request' + $ref: '#/components/schemas/update_developer_app_request_body' responses: "200": description: Developer app updated successfully @@ -986,7 +986,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_playlist_request' + $ref: '#/components/schemas/create_playlist_request_body' responses: "201": description: Playlist created successfully @@ -1225,7 +1225,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/update_playlist_request' + $ref: '#/components/schemas/update_playlist_request_body' responses: "200": description: Playlist updated successfully @@ -1689,7 +1689,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_track_request' + $ref: '#/components/schemas/create_track_request_body' responses: "201": description: Track created successfully @@ -2513,7 +2513,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/update_track_request' + $ref: '#/components/schemas/update_track_request_body' responses: "200": description: Track updated successfully @@ -3200,7 +3200,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/track_download_request' + $ref: '#/components/schemas/track_download_request_body' responses: "200": description: Track download recorded successfully @@ -3403,7 +3403,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_user_request' + $ref: '#/components/schemas/create_user_request_body' responses: "201": description: User created successfully @@ -3820,7 +3820,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/update_user_request' + $ref: '#/components/schemas/update_user_request_body' responses: "200": description: User updated successfully @@ -3987,7 +3987,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_user_developer_app_request' + $ref: '#/components/schemas/create_user_developer_app_request_body' responses: "200": description: Developer app created successfully @@ -4071,7 +4071,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/deactivate_access_key_request' + $ref: '#/components/schemas/deactivate_access_key_request_body' responses: "200": description: Access key deactivated successfully @@ -5967,7 +5967,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_coin_request' + $ref: '#/components/schemas/create_coin_request_body' responses: '201': description: Success - Coin created @@ -6030,7 +6030,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/update_coin_request' + $ref: '#/components/schemas/update_coin_request_body' responses: '200': description: Success - Coin updated @@ -6355,7 +6355,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/claim_rewards_request' + $ref: '#/components/schemas/claim_rewards_request_body' responses: "200": description: Success @@ -6380,7 +6380,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/create_reward_code_request' + $ref: '#/components/schemas/create_reward_code_request_body' responses: "201": description: Created - Reward code successfully created @@ -6424,7 +6424,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/prize_claim_request' + $ref: '#/components/schemas/prize_claim_request_body' responses: "200": description: Success - Prize claimed @@ -8718,7 +8718,7 @@ components: type: array items: $ref: '#/components/schemas/coin' - create_coin_request: + create_coin_request_body: type: object required: - mint @@ -8843,7 +8843,7 @@ components: format: date-time description: The date and time when the coin was created example: "2024-01-15T10:30:00Z" - update_coin_request: + update_coin_request_body: type: object description: Request body for updating coin information properties: @@ -9451,7 +9451,7 @@ components: type: string description: Error message if claim failed example: "Insufficient balance" - claim_rewards_request: + claim_rewards_request_body: type: object required: - userId @@ -9501,7 +9501,7 @@ components: enum: - used - invalid - create_reward_code_request: + create_reward_code_request_body: type: object required: - signature @@ -9545,7 +9545,7 @@ components: type: integer description: The reward amount example: 100 - prize_claim_request: + prize_claim_request_body: type: object required: - signature @@ -9745,7 +9745,7 @@ components: comment_id: type: string description: The ID of the created comment - create_track_request: + create_track_request_body: type: object required: - title @@ -9813,7 +9813,7 @@ components: parental_warning_type: type: string description: Parental warning type - update_track_request: + update_track_request_body: type: object description: Request body for updating track information. All fields are optional. properties: @@ -9848,7 +9848,7 @@ components: type: string description: URL for track artwork format: uri - create_playlist_request: + create_playlist_request_body: type: object required: - playlist_name @@ -9905,7 +9905,7 @@ components: is_image_autogenerated: type: boolean description: Whether the image is autogenerated - update_playlist_request: + update_playlist_request_body: type: object description: Request body for updating playlist information. All fields are optional. properties: @@ -9938,7 +9938,7 @@ components: upc: type: string description: Universal Product Code (for albums) - create_user_request: + create_user_request_body: type: object required: - handle @@ -10005,7 +10005,7 @@ components: spl_usdc_payout_wallet: type: string description: Solana USDC payout wallet address - update_user_request: + update_user_request_body: type: object description: Request body for updating user profile. All fields are optional. properties: @@ -10067,7 +10067,7 @@ components: coin_flair_mint: type: string description: Coin flair mint address - update_comment_request: + update_comment_request_body: type: object required: - body @@ -10075,7 +10075,7 @@ components: body: type: string description: The updated comment text - create_comment_request: + create_comment_request_body: type: object required: - entityType @@ -10100,7 +10100,7 @@ components: parentId: type: integer description: Parent comment ID if this is a reply - create_developer_app_request: + create_developer_app_request_body: type: object required: - name @@ -10130,7 +10130,7 @@ components: signature: type: string description: Signature - update_developer_app_request: + update_developer_app_request_body: type: object required: - name @@ -10146,7 +10146,7 @@ components: imageUrl: type: string description: App logo/image URL (camelCase) - create_user_developer_app_request: + create_user_developer_app_request_body: type: object required: - name @@ -10155,7 +10155,7 @@ components: type: string description: Developer app name (Plans API create) example: "My API Key" - deactivate_access_key_request: + deactivate_access_key_request_body: type: object required: - api_access_key @@ -10171,7 +10171,7 @@ components: api_access_key: type: string description: The newly created bearer token (API access key) - track_download_request: + track_download_request_body: type: object properties: city: From b279a0737cc5bc7c302d50865ff0e9dcc6a1762d Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:03:22 -0800 Subject: [PATCH 4/9] Type consolidation, format as date --- api/swagger/swagger-v1.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 5f923540..f10f8672 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -9871,11 +9871,9 @@ components: type: boolean description: Whether this is an album genre: - type: string - description: Playlist genre + $ref: '#/components/schemas/genre' mood: - type: string - description: Playlist mood + $ref: '#/components/schemas/mood' tags: type: string description: Comma-separated tags @@ -9887,6 +9885,7 @@ components: description: Universal Product Code (for albums) release_date: type: string + format: date description: Release date cover_art_cid: type: string @@ -9923,14 +9922,7 @@ components: type: array description: Array of track IDs to include in the playlist items: - type: object - properties: - track_id: - type: string - description: Track ID to add - timestamp: - type: integer - description: Unix timestamp when track was added + $ref: '#/components/schemas/playlist_added_timestamp' artwork_url: type: string description: URL for playlist artwork From f48671aec0a2382755ad1d765493ee9550ebea85 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:03:47 -0800 Subject: [PATCH 5/9] share playlist w/ userid queryparam --- api/swagger/swagger-v1.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index f10f8672..db6d6f4a 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -1494,6 +1494,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Playlist share recorded successfully From b83763010cd83c287d7faf2141221106ec862c01 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:04:29 -0800 Subject: [PATCH 6/9] user_id param for delete playlist --- api/swagger/swagger-v1.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index db6d6f4a..b0fd982b 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -1260,6 +1260,12 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: The user ID of the user making the request + required: true + schema: + type: string responses: "200": description: Playlist deleted successfully From fc864ff9e76f488418fcd2f7446b55ce772110c8 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:51:41 -0800 Subject: [PATCH 7/9] add enum for entityType and validation to comments --- api/swagger/swagger-v1.yaml | 13 +++++++++---- api/v1_comments.go | 12 +++++------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index b0fd982b..73b43463 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -7651,7 +7651,7 @@ components: entity_id: type: string entity_type: - type: string + $ref: '#/components/schemas/comment_entity_type' user_id: type: string message: @@ -7713,7 +7713,7 @@ components: entity_id: type: string entity_type: - type: string + $ref: '#/components/schemas/comment_entity_type' user_id: type: string message: @@ -10087,8 +10087,8 @@ components: - body properties: entityType: - type: string - description: Type of entity being commented on + allOf: + - $ref: '#/components/schemas/comment_entity_type' example: "Track" entityId: type: string @@ -10212,6 +10212,11 @@ components: success: type: boolean description: Whether the deactivation was successful + comment_entity_type: + type: string + description: Type of entity that can be commented on + enum: + - Track genre: type: string description: Music genre diff --git a/api/v1_comments.go b/api/v1_comments.go index f161735f..452e9a02 100644 --- a/api/v1_comments.go +++ b/api/v1_comments.go @@ -22,9 +22,9 @@ type GetCommentsParams struct { } type CreateCommentRequest struct { - EntityType string `json:"entityType"` - EntityId string `json:"entityId"` - Body string `json:"body"` + EntityType string `json:"entityType" validate:"required,oneof=Track"` + EntityId string `json:"entityId" validate:"required"` + Body string `json:"body" validate:"required"` CommentId *int `json:"commentId,omitempty"` ParentId *int `json:"parentId,omitempty"` } @@ -125,10 +125,8 @@ func (app *ApiServer) postV1Comment(c *fiber.Ctx) error { userID := app.getMyId(c) var req CreateCommentRequest - if err := c.BodyParser(&req); err != nil { - return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{ - "error": "Invalid request body", - }) + if err := app.ParseAndValidateBody(c, &req); err != nil { + return err } signer, err := app.getApiSigner(c) From 52997c3af10b57eafbd6e2f665ca5013e2348e28 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 17:08:08 -0800 Subject: [PATCH 8/9] remove duplicates due to multiple tags --- api/swagger/swagger-v1.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 73b43463..aaddcf7c 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -560,7 +560,7 @@ paths: tags: - developer_apps description: Gets developer app matching given address (API key) - operationId: Get Developer App By API Key + operationId: Get Developer App parameters: - name: address in: path @@ -3948,7 +3948,6 @@ paths: get: tags: - users - - developer_apps description: Get developer apps for the user (Plans API). Requires OAuth. operationId: Get User Developer Apps parameters: @@ -3981,7 +3980,6 @@ paths: post: tags: - users - - developer_apps description: Create a new developer app (Plans API). Requires OAuth Bearer token with plans app grant. operationId: Create User Developer App security: @@ -4020,7 +4018,6 @@ paths: delete: tags: - users - - developer_apps description: Delete a developer app (Plans API). Requires OAuth Bearer token with plans app grant. operationId: Delete User Developer App security: @@ -4059,7 +4056,6 @@ paths: post: tags: - users - - developer_apps description: Deactivate a bearer token (API access key) for a developer app (Plans API). Requires OAuth Bearer token with plans app grant. The deactivated token will no longer authenticate requests. operationId: Deactivate User Developer App Access Key security: @@ -4107,7 +4103,6 @@ paths: post: tags: - users - - developer_apps description: Create a new bearer token (API access key) for a developer app (Plans API). Requires OAuth Bearer token with plans app grant. operationId: Create User Developer App Access Key security: From 69fccfb484885174aae7dc8178d2830d4dbfbd31 Mon Sep 17 00:00:00 2001 From: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com> Date: Thu, 12 Feb 2026 18:18:38 -0800 Subject: [PATCH 9/9] should be cid not artwork url --- api/swagger/swagger-v1.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index aaddcf7c..b600fd9b 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -9930,10 +9930,9 @@ components: description: Array of track IDs to include in the playlist items: $ref: '#/components/schemas/playlist_added_timestamp' - artwork_url: + cover_art_cid: type: string - description: URL for playlist artwork - format: uri + description: IPFS CID for cover art upc: type: string description: Universal Product Code (for albums)