@@ -5,9 +5,8 @@ resources:
5
5
output : App\Dto\FeedSource
6
6
provider : App\State\FeedSourceProvider
7
7
processor : App\State\FeedSourceProcessor
8
-
9
8
operations :
10
- ApiPlatform\Metadata\Get : &get
9
+ ApiPlatform\Metadata\Get : &ref_0
11
10
normalizationContext :
12
11
jsonld_embed_context : true
13
12
openapiContext :
@@ -20,7 +19,7 @@ resources:
20
19
- schema :
21
20
type : string
22
21
format : ulid
23
- pattern : " ^[A-Za-z0-9]{26}$"
22
+ pattern : ' ^[A-Za-z0-9]{26}$'
24
23
name : id
25
24
in : path
26
25
required : true
@@ -29,14 +28,12 @@ resources:
29
28
description : OK
30
29
content :
31
30
application/ld+json :
32
- examples :
31
+ examples : null
33
32
headers : {}
34
-
35
- # https://api-platform.com/docs/core/controllers/
36
33
_api_Feed_get_source_config :
37
34
class : ApiPlatform\Metadata\Get
38
35
method : GET
39
- uriTemplate : ' /feed_sources /{id}/config/{name}'
36
+ uriTemplate : ' /feed-sources /{id}/config/{name}'
40
37
read : false
41
38
controller : App\Controller\FeedSourceConfigGetController
42
39
openapiContext :
@@ -49,13 +46,13 @@ resources:
49
46
- schema :
50
47
type : string
51
48
format : ulid
52
- pattern : " ^[A-Za-z0-9]{26}$"
49
+ pattern : ' ^[A-Za-z0-9]{26}$'
53
50
name : id
54
51
in : path
55
52
required : true
56
53
- schema :
57
54
type : string
58
- pattern : " ^[A-Za-z0-9]*$"
55
+ pattern : ' ^[A-Za-z0-9]*$'
59
56
name : name
60
57
in : path
61
58
required : true
@@ -66,17 +63,18 @@ resources:
66
63
examples :
67
64
example1 :
68
65
value :
69
- - {key: 'key1', id: 'id1', value: 'value1'}
66
+ - key : key1
67
+ id : id1
68
+ value : value1
70
69
headers : {}
71
-
72
70
ApiPlatform\Metadata\GetCollection :
73
71
filters :
74
- - ' entity.search_filter'
75
- - ' entity.blameable_filter'
76
- - ' entity.order_filter'
77
- - ' created.at.order_filter'
78
- - ' modified.at.order_filter'
79
- - ' feed_source.search_filter'
72
+ - entity.search_filter
73
+ - entity.blameable_filter
74
+ - entity.order_filter
75
+ - created.at.order_filter
76
+ - modified.at.order_filter
77
+ - feed_source.search_filter
80
78
openapiContext :
81
79
operationId : get-v2-feed-sources
82
80
description : Retrieves a collection of FeedSource resources.
@@ -99,23 +97,108 @@ resources:
99
97
description : The number of items per page
100
98
- schema :
101
99
type : string
102
- pattern : " ^[A-Za-z0-9]*$"
100
+ pattern : ' ^[A-Za-z0-9]*$'
103
101
name : supportedFeedOutputType
104
102
in : query
103
+ responses :
104
+ ' 200 ' :
105
+ description : OK
106
+ content :
107
+ application/ld+json :
108
+ examples : null
109
+ headers : {}
110
+ ApiPlatform\Metadata\Put :
111
+ security : is_granted("ROLE_ADMIN")
112
+ openapiContext :
113
+ description : Update a Feed Source resource.
114
+ summary : Update a Feed Source resource.
115
+ operationId : put-v2-feed-source-id
116
+ tags :
117
+ - FeedSources
118
+ parameters :
119
+ - schema :
120
+ type : string
121
+ format : ulid
122
+ pattern : ' ^[A-Za-z0-9]{26}$'
123
+ name : id
124
+ in : path
125
+ required : true
126
+ ApiPlatform\Metadata\Delete :
127
+ security : is_granted("ROLE_ADMIN")
128
+ openapiContext :
129
+ description : Delete a Feed Source resource.
130
+ summary : Delete a Feed Source resource.
131
+ operationId : delete-v2-feed-source-id
132
+ tags :
133
+ - FeedSources
134
+ parameters :
135
+ - schema :
136
+ type : string
137
+ format : ulid
138
+ pattern : ' ^[A-Za-z0-9]{26}$'
139
+ name : id
140
+ in : path
105
141
required : true
142
+ ApiPlatform\Metadata\Post :
143
+ security : is_granted("ROLE_ADMIN")
144
+ openapiContext :
145
+ operationId : create-v2-feed-source
146
+ description : Creates a Feed Source resource.
147
+ summary : Creates a Feed Source resource.
148
+ tags :
149
+ - FeedSources
150
+ ' _api_/feed_sources/{id}/slides_get ' : &ref_1
151
+ normalizationContext :
152
+ groups :
153
+ - ' playlist-slide:read'
154
+ class : ApiPlatform\Metadata\GetCollection
155
+ method : GET
156
+ provider : App\State\FeedSourceSlideProvider
157
+ filters :
158
+ - entity.search_filter
159
+ - entity.blameable_filter
160
+ - App\Filter\PublishedFilter
161
+ - entity.order_filter
162
+ - created.at.order_filter
163
+ - modified.at.order_filter
164
+ uriTemplate : ' /feed-sources/{id}/slides'
165
+ openapiContext :
166
+ description : Retrieves collection of weighted slide resources (feedsource).
167
+ summary : Retrieves collection of weighted slide resources (feedsource).
168
+ operationId : get-v2-feed-source-slide-id
169
+ tags :
170
+ - FeedSources
171
+ parameters :
172
+ - schema :
173
+ type : string
174
+ format : ulid
175
+ pattern : ' ^[A-Za-z0-9]{26}$'
176
+ name : id
177
+ in : path
178
+ required : true
179
+ - schema :
180
+ type : integer
181
+ minimum : 0
182
+ format : int32
183
+ default : 1
184
+ in : query
185
+ name : page
186
+ required : true
187
+ - schema :
188
+ type : string
189
+ default : ' 10'
190
+ in : query
191
+ name : itemsPerPage
192
+ description : The number of items per page
106
193
responses :
107
194
' 200 ' :
108
195
description : OK
109
196
content :
110
197
application/ld+json :
111
- examples :
198
+ examples : null
112
199
headers : {}
113
-
114
- # Our DTO must be a resource to get a proper URL
115
- # @see https://stackoverflow.com/a/75705084
116
- # @see https://github.com/api-platform/core/issues/5451
117
200
App\Dto\FeedSource :
118
201
provider : App\State\FeedSourceProvider
119
-
120
202
operations :
121
- ApiPlatform\Metadata\Get : *get
203
+ ApiPlatform\Metadata\Get : *ref_0
204
+ get_slides : *ref_1
0 commit comments