Skip to content

Commit 56d20a0

Browse files
committed
Fix response type of top artists and tracks request
1 parent 2e24014 commit 56d20a0

10 files changed

+104
-12
lines changed

fixed-spotify-open-api.yml

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ paths:
9393
- $ref: '#/components/parameters/QueryOffset'
9494
responses:
9595
"200":
96-
$ref: '#/components/responses/TracksPagingObject'
96+
$ref: '#/components/responses/SimplifiedTracksPagingObject'
9797
"401":
9898
$ref: '#/components/responses/Unauthorized'
9999
"403":
@@ -3933,9 +3933,9 @@ components:
39333933
type: object
39343934
properties:
39353935
tracks:
3936-
$ref: '#/components/schemas/TracksPagingObject'
3936+
$ref: '#/components/schemas/SimplifiedTracksPagingObject'
39373937
artists:
3938-
$ref: '#/components/schemas/ArtistsPagingObject'
3938+
$ref: '#/components/schemas/SimplifiedArtistsPagingObject'
39393939
albums:
39403940
$ref: '#/components/schemas/AlbumsPagingObject'
39413941
playlists:
@@ -4093,6 +4093,18 @@ components:
40934093
type: array
40944094
items:
40954095
$ref: '#/components/schemas/SavedTrackObject'
4096+
SimplifiedArtistsPagingObject:
4097+
description: Pages of artists
4098+
content:
4099+
application/json:
4100+
schema:
4101+
$ref: '#/components/schemas/SimplifiedArtistsPagingObject'
4102+
SimplifiedTracksPagingObject:
4103+
description: Pages of tracks
4104+
content:
4105+
application/json:
4106+
schema:
4107+
$ref: '#/components/schemas/SimplifiedTracksPagingObject'
40964108
TracksPagingObject:
40974109
description: Pages of tracks
40984110
content:
@@ -6169,7 +6181,7 @@ components:
61696181
tracks:
61706182
type: object
61716183
allOf:
6172-
- $ref: '#/components/schemas/TracksPagingObject'
6184+
- $ref: '#/components/schemas/SimplifiedTracksPagingObject'
61736185
description: |
61746186
The tracks of the album.
61756187
popularity:
@@ -6320,7 +6332,7 @@ components:
63206332
items:
63216333
type: array
63226334
items:
6323-
$ref: '#/components/schemas/SimplifiedArtistObject'
6335+
$ref: '#/components/schemas/ArtistObject'
63246336
EpisodesPagingObject:
63256337
allOf:
63266338
- $ref: '#/components/schemas/PagingObject'
@@ -6357,7 +6369,16 @@ components:
63576369
type: array
63586370
items:
63596371
$ref: '#/components/schemas/SimplifiedShowObject'
6360-
TracksPagingObject:
6372+
SimplifiedArtistsPagingObject:
6373+
allOf:
6374+
- $ref: '#/components/schemas/PagingObject'
6375+
- type: object
6376+
properties:
6377+
items:
6378+
type: array
6379+
items:
6380+
$ref: '#/components/schemas/SimplifiedArtistObject'
6381+
SimplifiedTracksPagingObject:
63616382
allOf:
63626383
- $ref: '#/components/schemas/PagingObject'
63636384
- type: object
@@ -6366,6 +6387,15 @@ components:
63666387
type: array
63676388
items:
63686389
$ref: '#/components/schemas/SimplifiedTrackObject'
6390+
TracksPagingObject:
6391+
allOf:
6392+
- $ref: '#/components/schemas/PagingObject'
6393+
- type: object
6394+
properties:
6395+
items:
6396+
type: array
6397+
items:
6398+
$ref: '#/components/schemas/TrackObject'
63696399
parameters:
63706400
PathAlbumId:
63716401
in: path

spotify-web-api-open-api/src/main/resources/patches/path-get-an-albums-tracks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ operations:
55
value: '#/components/responses/PagingObject'
66
- op: set
77
path: "$.paths./albums/{id}/tracks.get.responses.200.$ref"
8-
value: '#/components/responses/TracksPagingObject'
8+
value: '#/components/responses/SimplifiedTracksPagingObject'

spotify-web-api-open-api/src/main/resources/patches/response-SearchItems.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ operations:
66
value: '#/components/schemas/PagingObject'
77
- op: set
88
path: "$.components.responses.SearchItems.content.application/json.schema.properties.tracks.$ref"
9-
value: '#/components/schemas/TracksPagingObject'
9+
value: '#/components/schemas/SimplifiedTracksPagingObject'
1010
# artists
1111
- op: test
1212
path: "$.components.responses.SearchItems.content.application/json.schema.properties.artists.$ref"
1313
value: '#/components/schemas/PagingObject'
1414
- op: set
1515
path: "$.components.responses.SearchItems.content.application/json.schema.properties.artists.$ref"
16-
value: '#/components/schemas/ArtistsPagingObject'
16+
value: '#/components/schemas/SimplifiedArtistsPagingObject'
1717
# albums
1818
- op: test
1919
path: "$.components.responses.SearchItems.content.application/json.schema.properties.albums.$ref"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
description: Add response for SimplifiedArtistsPagingObject
2+
operations:
3+
- op: test
4+
path: "$.components.responses.SimplifiedArtistsPagingObject"
5+
value: null
6+
- op: put
7+
path: "$.components.responses"
8+
key: SimplifiedArtistsPagingObject
9+
value:
10+
description: Pages of artists
11+
content:
12+
application/json:
13+
schema:
14+
$ref: '#/components/schemas/SimplifiedArtistsPagingObject'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
description: Add response for SimplifiedTracksPagingObject
2+
operations:
3+
- op: test
4+
path: "$.components.responses.SimplifiedTracksPagingObject"
5+
value: null
6+
- op: put
7+
path: "$.components.responses"
8+
key: SimplifiedTracksPagingObject
9+
value:
10+
description: Pages of tracks
11+
content:
12+
application/json:
13+
schema:
14+
$ref: '#/components/schemas/SimplifiedTracksPagingObject'

spotify-web-api-open-api/src/main/resources/patches/schema-AlbumObject-tracks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ operations:
55
value: '#/components/schemas/PagingObject'
66
- op: set
77
path: "$.components.schemas.AlbumObject.allOf[1].properties.tracks.allOf[0].$ref"
8-
value: '#/components/schemas/TracksPagingObject'
8+
value: '#/components/schemas/SimplifiedTracksPagingObject'

spotify-web-api-open-api/src/main/resources/patches/schema-ArtistsPagingObject.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ operations:
1414
items:
1515
type: array
1616
items:
17-
$ref: '#/components/schemas/SimplifiedArtistObject'
17+
$ref: '#/components/schemas/ArtistObject'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
description: Add schema for SimplifiedArtistsPagingObject
2+
operations:
3+
- op: test
4+
path: "$.components.schemas.SimplifiedArtistsPagingObject"
5+
value: null
6+
- op: put
7+
path: "$.components.schemas"
8+
key: SimplifiedArtistsPagingObject
9+
value:
10+
allOf:
11+
- $ref: '#/components/schemas/PagingObject'
12+
- type: object
13+
properties:
14+
items:
15+
type: array
16+
items:
17+
$ref: '#/components/schemas/SimplifiedArtistObject'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
description: Add schema for SimplifiedTracksPagingObject
2+
operations:
3+
- op: test
4+
path: "$.components.schemas.SimplifiedTracksPagingObject"
5+
value: null
6+
- op: put
7+
path: "$.components.schemas"
8+
key: SimplifiedTracksPagingObject
9+
value:
10+
allOf:
11+
- $ref: '#/components/schemas/PagingObject'
12+
- type: object
13+
properties:
14+
items:
15+
type: array
16+
items:
17+
$ref: '#/components/schemas/SimplifiedTrackObject'

spotify-web-api-open-api/src/main/resources/patches/schema-TracksPagingObject.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ operations:
1414
items:
1515
type: array
1616
items:
17-
$ref: '#/components/schemas/SimplifiedTrackObject'
17+
$ref: '#/components/schemas/TrackObject'

0 commit comments

Comments
 (0)