Skip to content

Commit 1bc2fb8

Browse files
authored
Update of Spotify's OpenAPI definition (#291)
* Automated update of Spotify's OpenAPI definition * Remove obsolete patches
1 parent 36b6c60 commit 1bc2fb8

File tree

5 files changed

+121
-184
lines changed

5 files changed

+121
-184
lines changed

fixed-spotify-open-api.yml

Lines changed: 56 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ paths:
160160
- $ref: '#/components/parameters/QueryOffset'
161161
responses:
162162
"200":
163-
$ref: '#/components/responses/PagingSimplifiedAlbumObject'
163+
$ref: '#/components/responses/PagingArtistDiscographyAlbumObject'
164164
"401":
165165
$ref: '#/components/responses/Unauthorized'
166166
"403":
@@ -3932,12 +3932,12 @@ components:
39323932
application/json:
39333933
schema:
39343934
$ref: '#/components/schemas/PagingPlaylistTrackObject'
3935-
PagingSimplifiedAlbumObject:
3935+
PagingArtistDiscographyAlbumObject:
39363936
description: Pages of albums
39373937
content:
39383938
application/json:
39393939
schema:
3940-
$ref: '#/components/schemas/PagingSimplifiedAlbumObject'
3940+
$ref: '#/components/schemas/PagingArtistDiscographyAlbumObject'
39413941
PagingSavedAlbumObject:
39423942
description: Pages of albums
39433943
content:
@@ -5345,6 +5345,17 @@ components:
53455345
type: string
53465346
playlists:
53475347
$ref: '#/components/schemas/PagingPlaylistObject'
5348+
PagingArtistDiscographyAlbumObject:
5349+
type: object
5350+
x-spotify-docs-type: PagingArtistDiscographyAlbumObject
5351+
allOf:
5352+
- $ref: '#/components/schemas/PagingObject'
5353+
- type: object
5354+
properties:
5355+
items:
5356+
type: array
5357+
items:
5358+
$ref: '#/components/schemas/ArtistDiscographyAlbumObject'
53485359
PagingSimplifiedAlbumObject:
53495360
type: object
53505361
x-spotify-docs-type: PagingAlbumObject
@@ -6499,6 +6510,20 @@ components:
64996510
- type: object
65006511
required:
65016512
- artists
6513+
properties:
6514+
artists:
6515+
type: array
6516+
items:
6517+
$ref: '#/components/schemas/SimplifiedArtistObject'
6518+
description: |
6519+
The artists of the album. Each artist object includes a link in `href` to more detailed information about the artist.
6520+
ArtistDiscographyAlbumObject:
6521+
x-spotify-docs-type: ArtistDiscographyAlbumObject
6522+
allOf:
6523+
- $ref: '#/components/schemas/SimplifiedAlbumObject'
6524+
- type: object
6525+
required:
6526+
- album_group
65026527
properties:
65036528
album_group:
65046529
type: string
@@ -6509,13 +6534,7 @@ components:
65096534
- appears_on
65106535
example: compilation
65116536
description: |
6512-
The field is present when getting an artist's albums. Compare to album_type this field represents relationship between the artist and the album.
6513-
artists:
6514-
type: array
6515-
items:
6516-
$ref: '#/components/schemas/SimplifiedArtistObject'
6517-
description: |
6518-
The artists of the album. Each artist object includes a link in `href` to more detailed information about the artist.
6537+
This field describes the relationship between the artist and the album.
65196538
ChapterObject:
65206539
x-spotify-docs-type: ChapterObject
65216540
type: object
@@ -6672,6 +6691,14 @@ components:
66726691
Included in the response when a content restriction is applied.
66736692
AlbumObject:
66746693
x-spotify-docs-type: AlbumObject
6694+
required:
6695+
- artists
6696+
- tracks
6697+
- copyrights
6698+
- external_ids
6699+
- genres
6700+
- label
6701+
- popularity
66756702
allOf:
66766703
- $ref: '#/components/schemas/AlbumBase'
66776704
- type: object
@@ -6687,30 +6714,34 @@ components:
66876714
- $ref: '#/components/schemas/PagingSimplifiedTrackObject'
66886715
description: |
66896716
The tracks of the album.
6690-
popularity:
6691-
type: integer
6692-
description: "The popularity of the album, with 100 being the most popular.\
6693-
\ The popularity is calculated from the popularity of the album's individual\
6694-
\ tracks."
6695-
label:
6696-
type: string
6697-
description: The label for the album.
6717+
copyrights:
6718+
type: array
6719+
items:
6720+
$ref: '#/components/schemas/CopyrightObject'
6721+
description: |
6722+
The copyright statements of the album.
66986723
external_ids:
66996724
allOf:
67006725
- $ref: '#/components/schemas/ExternalIdObject'
67016726
description: |
67026727
Known external IDs for the album.
67036728
genres:
67046729
type: array
6705-
description: "A list of the genres used to classify the album. (If not\
6706-
\ yet classified, the array is empty.)"
67076730
items:
67086731
type: string
6709-
copyrights:
6710-
type: array
6711-
items:
6712-
$ref: '#/components/schemas/CopyrightObject'
6713-
description: The copyright statements of the album.
6732+
example:
6733+
- Egg punk
6734+
- Noise rock
6735+
description: |
6736+
A list of the genres the album is associated with. If not yet classified, the array is empty.
6737+
label:
6738+
type: string
6739+
description: |
6740+
The label associated with the album.
6741+
popularity:
6742+
type: integer
6743+
description: |
6744+
The popularity of the album. The value will be between 0 and 100, with 100 being the most popular.
67146745
ContextObject:
67156746
type: object
67166747
x-spotify-docs-type: ContextObject

official-spotify-open-api.yml

Lines changed: 65 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ paths:
169169
- $ref: '#/components/parameters/QueryOffset'
170170
responses:
171171
'200':
172-
$ref: '#/components/responses/PagingSimplifiedAlbumObject'
172+
$ref: '#/components/responses/PagingArtistDiscographyAlbumObject'
173173
'401':
174174
$ref: '#/components/responses/Unauthorized'
175175
'403':
@@ -4036,12 +4036,12 @@ components:
40364036
schema:
40374037
$ref: '#/components/schemas/PagingPlaylistTrackObject'
40384038

4039-
PagingSimplifiedAlbumObject:
4039+
PagingArtistDiscographyAlbumObject:
40404040
description: Pages of albums
40414041
content:
40424042
application/json:
40434043
schema:
4044-
$ref: '#/components/schemas/PagingSimplifiedAlbumObject'
4044+
$ref: '#/components/schemas/PagingArtistDiscographyAlbumObject'
40454045

40464046
PagingSavedAlbumObject:
40474047
description: Pages of albums
@@ -5400,6 +5400,18 @@ components:
54005400
playlists:
54015401
$ref: '#/components/schemas/PagingPlaylistObject'
54025402

5403+
PagingArtistDiscographyAlbumObject:
5404+
type: object
5405+
x-spotify-docs-type: PagingArtistDiscographyAlbumObject
5406+
allOf:
5407+
- $ref: '#/components/schemas/PagingObject'
5408+
- type: object
5409+
properties:
5410+
items:
5411+
type: array
5412+
items:
5413+
$ref: '#/components/schemas/ArtistDiscographyAlbumObject'
5414+
54035415
PagingSimplifiedAlbumObject:
54045416
type: object
54055417
x-spotify-docs-type: PagingAlbumObject
@@ -6568,32 +6580,6 @@ components:
65686580
example: 'spotify:album:2up3OPMp9Tb4dAKM2erWXQ'
65696581
description: |
65706582
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the album.
6571-
copyrights:
6572-
type: array
6573-
items:
6574-
$ref: '#/components/schemas/CopyrightObject'
6575-
description: |
6576-
The copyright statements of the album.
6577-
external_ids:
6578-
allOf:
6579-
- $ref: '#/components/schemas/ExternalIdObject'
6580-
description: |
6581-
Known external IDs for the album.
6582-
genres:
6583-
type: array
6584-
items:
6585-
type: string
6586-
example: ['Egg punk', 'Noise rock']
6587-
description: |
6588-
A list of the genres the album is associated with. If not yet classified, the array is empty.
6589-
label:
6590-
type: string
6591-
description: |
6592-
The label associated with the album.
6593-
popularity:
6594-
type: integer
6595-
description: |
6596-
The popularity of the album. The value will be between 0 and 100, with 100 being the most popular.
65976583
65986584
SimplifiedAlbumObject:
65996585
x-spotify-docs-type: SimplifiedAlbumObject
@@ -6603,19 +6589,28 @@ components:
66036589
required:
66046590
- artists
66056591
properties:
6606-
album_group:
6607-
type: string
6608-
enum: [album, single, compilation, appears_on]
6609-
example: compilation
6610-
description: |
6611-
The field is present when getting an artist's albums. Compare to album_type this field represents relationship between the artist and the album.
66126592
artists:
66136593
type: array
66146594
items:
66156595
$ref: '#/components/schemas/SimplifiedArtistObject'
66166596
description: |
66176597
The artists of the album. Each artist object includes a link in `href` to more detailed information about the artist.
66186598
6599+
ArtistDiscographyAlbumObject:
6600+
x-spotify-docs-type: ArtistDiscographyAlbumObject
6601+
allOf:
6602+
- $ref: '#/components/schemas/SimplifiedAlbumObject'
6603+
- type: object
6604+
required:
6605+
- album_group
6606+
properties:
6607+
album_group:
6608+
type: string
6609+
enum: [album, single, compilation, appears_on]
6610+
example: compilation
6611+
description: |
6612+
This field describes the relationship between the artist and the album.
6613+
66196614
ChapterObject:
66206615
x-spotify-docs-type: ChapterObject
66216616
type: object
@@ -6771,20 +6766,54 @@ components:
67716766
67726767
AlbumObject:
67736768
x-spotify-docs-type: AlbumObject
6769+
required:
6770+
- artists
6771+
- tracks
6772+
- copyrights
6773+
- external_ids
6774+
- genres
6775+
- label
6776+
- popularity
67746777
allOf:
67756778
- $ref: '#/components/schemas/AlbumBase'
67766779
- type: object
67776780
properties:
67786781
artists:
67796782
type: array
67806783
items:
6781-
$ref: '#/components/schemas/ArtistObject'
6784+
$ref: '#/components/schemas/SimplifiedArtistObject'
67826785
description: |
67836786
The artists of the album. Each artist object includes a link in `href` to more detailed information about the artist.
67846787
tracks:
67856788
$ref: '#/components/schemas/PagingSimplifiedTrackObject'
67866789
description: |
67876790
The tracks of the album.
6791+
copyrights:
6792+
type: array
6793+
items:
6794+
$ref: '#/components/schemas/CopyrightObject'
6795+
description: |
6796+
The copyright statements of the album.
6797+
external_ids:
6798+
allOf:
6799+
- $ref: '#/components/schemas/ExternalIdObject'
6800+
description: |
6801+
Known external IDs for the album.
6802+
genres:
6803+
type: array
6804+
items:
6805+
type: string
6806+
example: ['Egg punk', 'Noise rock']
6807+
description: |
6808+
A list of the genres the album is associated with. If not yet classified, the array is empty.
6809+
label:
6810+
type: string
6811+
description: |
6812+
The label associated with the album.
6813+
popularity:
6814+
type: integer
6815+
description: |
6816+
The popularity of the album. The value will be between 0 and 100, with 100 being the most popular.
67886817
67896818
ContextObject:
67906819
type: object

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

Lines changed: 0 additions & 55 deletions
This file was deleted.

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

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)