Skip to content

Commit 978af01

Browse files
committed
Add Audiobooks and Chapters API
1 parent 0d392c5 commit 978af01

9 files changed

+1090
-26
lines changed

fixed-spotify-open-api.yml

Lines changed: 505 additions & 2 deletions
Large diffs are not rendered by default.

official-spotify-open-api.yml

Lines changed: 520 additions & 24 deletions
Large diffs are not rendered by default.

spotify-web-api-open-api/src/main/resources/patches/path-search.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ operations:
1212
- track
1313
- show
1414
- episode
15+
- audiobook
1516
- op: put
1617
path: "$.paths./search.get.parameters[?(@.name=='type')].schema"
1718
key: items
@@ -24,6 +25,7 @@ operations:
2425
- track
2526
- show
2627
- episode
28+
- audiobook
2729
- op: delete
2830
path: "$.paths./search.get.parameters[?(@.name=='type')].schema.enum"
2931
- op: test

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,10 @@ operations:
4242
- op: set
4343
path: "$.components.responses.SearchItems.content.application/json.schema.properties.episodes.$ref"
4444
value: '#/components/schemas/EpisodesPagingObject'
45+
# audiobooks
46+
- op: test
47+
path: "$.components.responses.SearchItems.content.application/json.schema.properties.audiobooks.$ref"
48+
value: '#/components/schemas/PagingObject'
49+
- op: set
50+
path: "$.components.responses.SearchItems.content.application/json.schema.properties.audiobooks.$ref"
51+
value: '#/components/schemas/AudiobooksPagingObject'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
description: Fix type of chapters property to ChaptersPagingObject
2+
operations:
3+
- op: test
4+
path: "$.components.schemas.AudiobookObject.allOf[1].properties.chapters.allOf[0].$ref"
5+
value: '#/components/schemas/PagingObject'
6+
- op: set
7+
path: "$.components.schemas.AudiobookObject.allOf[1].properties.chapters.allOf[0].$ref"
8+
value: '#/components/schemas/ChaptersPagingObject'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
description: Add schema for AudiobooksPagingObject
2+
operations:
3+
- op: test
4+
path: "$.components.schemas.AudiobooksPagingObject"
5+
value: null
6+
- op: put
7+
path: "$.components.schemas"
8+
key: AudiobooksPagingObject
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/SimplifiedAudiobookObject'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
description: Add schema for ChaptersPagingObject
2+
operations:
3+
- op: test
4+
path: "$.components.schemas.ChaptersPagingObject"
5+
value: null
6+
- op: put
7+
path: "$.components.schemas"
8+
key: ChaptersPagingObject
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/SimplifiedChapterObject'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
description: 'SimplifiedAudiobookObject: second item of allOf property is unnecessary'
2+
operations:
3+
- op: test
4+
path: "$.components.schemas.SimplifiedAudiobookObject.allOf[1].type"
5+
value: object
6+
- op: delete
7+
path: "$.components.schemas.SimplifiedAudiobookObject.allOf[1]"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
description: 'SimplifiedChapterObject: second item of allOf property is unnecessary'
2+
operations:
3+
- op: test
4+
path: "$.components.schemas.SimplifiedChapterObject.allOf[1].type"
5+
value: object
6+
- op: delete
7+
path: "$.components.schemas.SimplifiedChapterObject.allOf[1]"

0 commit comments

Comments
 (0)