Skip to content

Commit 5e5af0c

Browse files
committed
Update to latest Open API definition
1 parent d9b3e10 commit 5e5af0c

File tree

85 files changed

+321
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+321
-259
lines changed

spotify-web-api-java-generator/fixed-spotify-open-api.yml

Lines changed: 142 additions & 110 deletions
Large diffs are not rendered by default.

spotify-web-api-java-generator/src/main/java/de/sonallux/spotify/generator/java/GenerationContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ public ApiResponse getResponse(Operation operation) {
7272
if (responses.containsKey("204")) {
7373
return responses.get("204");
7474
}
75+
if (responses.containsKey("202")) {
76+
return responses.get("202");
77+
}
7578
return responses.getDefault();
7679
}
7780

spotify-web-api-java-generator/src/main/java/de/sonallux/spotify/generator/java/generators/ObjectModelCreator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ private void visitOperation(ApiCategory category, PathItem.HttpMethod method, St
7373
endpoint.addBodyParameter(parameter, isRequired);
7474
});
7575
} else if (requestBody.getContent().containsKey("image/jpeg")) {
76-
var parameter = new ApiEndpoint.RawBodyParameter("base64Image", "String", requestBody.getDescription(), "image/jpeg");
76+
var content = requestBody.getContent().get("image/jpeg");
77+
var parameter = new ApiEndpoint.RawBodyParameter("base64Image", "String", content.getSchema().getDescription(), "image/jpeg");
7778
endpoint.addBodyParameter(parameter, requestBody.getRequired());
7879
}
7980
}

spotify-web-api-java/src/main/generated/de/sonallux/spotify/api/apis/AlbumsApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class AlbumsApi {
1414
/**
1515
* <h4>Get Album</h4>
1616
* <p>Get Spotify catalog information for a single album.</p>
17-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a> of the album.</p>
17+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a> of the album.</p>
1818
* @return a {@link GetAlbumRequest} object to build and execute the request
1919
*/
2020
public GetAlbumRequest getAlbum(String id) {
@@ -24,7 +24,7 @@ public GetAlbumRequest getAlbum(String id) {
2424
/**
2525
* <h4>Get Album Tracks</h4>
2626
* <p>Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.</p>
27-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a> of the album.</p>
27+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a> of the album.</p>
2828
* @return a {@link GetAlbumsTracksRequest} object to build and execute the request
2929
*/
3030
public GetAlbumsTracksRequest getAlbumsTracks(String id) {
@@ -34,7 +34,7 @@ public GetAlbumsTracksRequest getAlbumsTracks(String id) {
3434
/**
3535
* <h4>Get Several Albums</h4>
3636
* <p>Get Spotify catalog information for multiple albums identified by their Spotify IDs.</p>
37-
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify IDs</a> for the albums. Maximum: 20 IDs.</p>
37+
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify IDs</a> for the albums. Maximum: 20 IDs.</p>
3838
* @return a {@link GetMultipleAlbumsRequest} object to build and execute the request
3939
*/
4040
public GetMultipleAlbumsRequest getMultipleAlbums(String ids) {

spotify-web-api-java/src/main/generated/de/sonallux/spotify/api/apis/ArtistsApi.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class ArtistsApi {
1414
/**
1515
* <h4>Get Artist</h4>
1616
* <p>Get Spotify catalog information for a single artist identified by their unique Spotify ID.</p>
17-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a> of the artist.</p>
17+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a> of the artist.</p>
1818
* @return a {@link GetArtistRequest} object to build and execute the request
1919
*/
2020
public GetArtistRequest getArtist(String id) {
@@ -24,7 +24,7 @@ public GetArtistRequest getArtist(String id) {
2424
/**
2525
* <h4>Get Artist's Albums</h4>
2626
* <p>Get Spotify catalog information about an artist's albums.</p>
27-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a> of the artist.</p>
27+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a> of the artist.</p>
2828
* @return a {@link GetArtistsAlbumsRequest} object to build and execute the request
2929
*/
3030
public GetArtistsAlbumsRequest getArtistsAlbums(String id) {
@@ -34,7 +34,7 @@ public GetArtistsAlbumsRequest getArtistsAlbums(String id) {
3434
/**
3535
* <h4>Get Artist's Related Artists</h4>
3636
* <p>Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's <a href="https://news.spotify.com/se/2010/02/03/related-artists/">listening history</a>.</p>
37-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a> of the artist.</p>
37+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a> of the artist.</p>
3838
* @return a {@link GetArtistsRelatedArtistsRequest} object to build and execute the request
3939
*/
4040
public GetArtistsRelatedArtistsRequest getArtistsRelatedArtists(String id) {
@@ -44,7 +44,7 @@ public GetArtistsRelatedArtistsRequest getArtistsRelatedArtists(String id) {
4444
/**
4545
* <h4>Get Artist's Top Tracks</h4>
4646
* <p>Get Spotify catalog information about an artist's top tracks by country.</p>
47-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a> of the artist.</p>
47+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a> of the artist.</p>
4848
* @return a {@link GetArtistsTopTracksRequest} object to build and execute the request
4949
*/
5050
public GetArtistsTopTracksRequest getArtistsTopTracks(String id) {
@@ -54,7 +54,7 @@ public GetArtistsTopTracksRequest getArtistsTopTracks(String id) {
5454
/**
5555
* <h4>Get Several Artists</h4>
5656
* <p>Get Spotify catalog information for several artists based on their Spotify IDs.</p>
57-
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify IDs</a> for the artists. Maximum: 50 IDs.</p>
57+
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify IDs</a> for the artists. Maximum: 50 IDs.</p>
5858
* @return a {@link GetMultipleArtistsRequest} object to build and execute the request
5959
*/
6060
public GetMultipleArtistsRequest getMultipleArtists(String ids) {

spotify-web-api-java/src/main/generated/de/sonallux/spotify/api/apis/AudiobooksApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class AudiobooksApi {
1414
/**
1515
* <h4>Get an Audiobook</h4>
1616
* <p>Get Spotify catalog information for a single audiobook.<br><strong>Note: Audiobooks are only available for the US, UK, Ireland, New Zealand and Australia markets.</strong></p>
17-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a>for the audiobook.</p>
17+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a>for the audiobook.</p>
1818
* @return a {@link GetAudiobookRequest} object to build and execute the request
1919
*/
2020
public GetAudiobookRequest getAudiobook(String id) {
@@ -24,7 +24,7 @@ public GetAudiobookRequest getAudiobook(String id) {
2424
/**
2525
* <h4>Get Audiobook Chapters</h4>
2626
* <p>Get Spotify catalog information about an audiobook's chapters.<br><strong>Note: Audiobooks are only available for the US, UK, Ireland, New Zealand and Australia markets.</strong></p>
27-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a>for the audiobook.</p>
27+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a>for the audiobook.</p>
2828
* @return a {@link GetAudiobookChaptersRequest} object to build and execute the request
2929
*/
3030
public GetAudiobookChaptersRequest getAudiobookChapters(String id) {
@@ -34,7 +34,7 @@ public GetAudiobookChaptersRequest getAudiobookChapters(String id) {
3434
/**
3535
* <h4>Get Several Audiobooks</h4>
3636
* <p>Get Spotify catalog information for several audiobooks identified by their Spotify IDs.<br><strong>Note: Audiobooks are only available for the US, UK, Ireland, New Zealand and Australia markets.</strong></p>
37-
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify IDs</a>. For example: <code>ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ</code>. Maximum: 50 IDs.</p>
37+
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify IDs</a>. For example: <code>ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ</code>. Maximum: 50 IDs.</p>
3838
* @return a {@link GetMultipleAudiobooksRequest} object to build and execute the request
3939
*/
4040
public GetMultipleAudiobooksRequest getMultipleAudiobooks(String ids) {

spotify-web-api-java/src/main/generated/de/sonallux/spotify/api/apis/BrowseApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public GetCategoriesRequest getCategories() {
2323
/**
2424
* <h4>Get Category's Playlists</h4>
2525
* <p>Get a list of Spotify playlists tagged with a particular category.</p>
26-
* @param categoryId <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify category ID</a> for the category.</p>
26+
* @param categoryId <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify category ID</a> for the category.</p>
2727
* @return a {@link GetCategoriesPlaylistsRequest} object to build and execute the request
2828
*/
2929
public GetCategoriesPlaylistsRequest getCategoriesPlaylists(String categoryId) {
@@ -33,7 +33,7 @@ public GetCategoriesPlaylistsRequest getCategoriesPlaylists(String categoryId) {
3333
/**
3434
* <h4>Get Single Browse Category</h4>
3535
* <p>Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).</p>
36-
* @param categoryId <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify category ID</a> for the category.</p>
36+
* @param categoryId <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify category ID</a> for the category.</p>
3737
* @return a {@link GetCategoryRequest} object to build and execute the request
3838
*/
3939
public GetCategoryRequest getCategory(String categoryId) {
@@ -60,7 +60,7 @@ public GetNewReleasesRequest getNewReleases() {
6060

6161
/**
6262
* <h4>Get Available Genre Seeds</h4>
63-
* <p>Retrieve a list of available genres seed parameter values for <a href="https://developer.spotify.com/documentation/web-api/reference/#/operations/get-recommendations">recommendations</a>.</p>
63+
* <p>Retrieve a list of available genres seed parameter values for <a href="https://developer.spotify.com/documentation/web-api/reference/get-recommendations">recommendations</a>.</p>
6464
* @return a {@link GetRecommendationGenresRequest} object to build and execute the request
6565
*/
6666
public GetRecommendationGenresRequest getRecommendationGenres() {

spotify-web-api-java/src/main/generated/de/sonallux/spotify/api/apis/ChaptersApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class ChaptersApi {
1414
/**
1515
* <h4>Get a Chapter</h4>
1616
* <p>Get Spotify catalog information for a single chapter.<br><strong>Note: Chapters are only available for the US, UK, Ireland, New Zealand and Australia markets.</strong></p>
17-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a>for the chapter.</p>
17+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a>for the chapter.</p>
1818
* @return a {@link GetChapterRequest} object to build and execute the request
1919
*/
2020
public GetChapterRequest getChapter(String id) {
@@ -24,7 +24,7 @@ public GetChapterRequest getChapter(String id) {
2424
/**
2525
* <h4>Get Several Chapters</h4>
2626
* <p>Get Spotify catalog information for several chapters identified by their Spotify IDs.<br><strong>Note: Chapters are only available for the US, UK, Ireland, New Zealand and Australia markets.</strong></p>
27-
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify IDs</a>. For example: <code>ids=0IsXVP0JmcB2adSE338GkK,3ZXb8FKZGU0EHALYX6uCzU</code>. Maximum: 50 IDs.</p>
27+
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify IDs</a>. For example: <code>ids=0IsXVP0JmcB2adSE338GkK,3ZXb8FKZGU0EHALYX6uCzU</code>. Maximum: 50 IDs.</p>
2828
* @return a {@link GetSeveralChaptersRequest} object to build and execute the request
2929
*/
3030
public GetSeveralChaptersRequest getSeveralChapters(String ids) {

spotify-web-api-java/src/main/generated/de/sonallux/spotify/api/apis/EpisodesApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class EpisodesApi {
1414
/**
1515
* <h4>Get Episode</h4>
1616
* <p>Get Spotify catalog information for a single episode identified by its unique Spotify ID.</p>
17-
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a> for the episode.</p>
17+
* @param id <p>The <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a> for the episode.</p>
1818
* @return a {@link GetEpisodeRequest} object to build and execute the request
1919
*/
2020
public GetEpisodeRequest getEpisode(String id) {
@@ -24,7 +24,7 @@ public GetEpisodeRequest getEpisode(String id) {
2424
/**
2525
* <h4>Get Several Episodes</h4>
2626
* <p>Get Spotify catalog information for several episodes based on their Spotify IDs.</p>
27-
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify IDs</a> for the episodes. Maximum: 50 IDs.</p>
27+
* @param ids <p>A comma-separated list of the <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify IDs</a> for the episodes. Maximum: 50 IDs.</p>
2828
* @return a {@link GetMultipleEpisodesRequest} object to build and execute the request
2929
*/
3030
public GetMultipleEpisodesRequest getMultipleEpisodes(String ids) {

0 commit comments

Comments
 (0)