File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 22
22
use ApiPlatform \Metadata \HttpOperation ;
23
23
use ApiPlatform \Metadata \Resource \Factory \ResourceMetadataCollectionFactoryInterface ;
24
24
use ApiPlatform \Metadata \Resource \Factory \ResourceNameCollectionFactoryInterface ;
25
+ use ApiPlatform \OpenApi \Attributes \Webhook ;
25
26
use Illuminate \Support \Facades \Route ;
26
27
27
28
$ globalMiddlewares = config ()->get ('api-platform.routes.middleware ' , []);
34
35
foreach ($ resourceNameCollectionFactory ->create () as $ resourceClass ) {
35
36
foreach ($ resourceMetadataFactory ->create ($ resourceClass ) as $ resourceMetadata ) {
36
37
foreach ($ resourceMetadata ->getOperations () as $ operation ) {
38
+ if ($ operation ->getOpenapi () instanceof Webhook) {
39
+ continue ;
40
+ }
41
+
37
42
if ($ operation ->getRouteName ()) {
38
43
continue ;
39
44
}
Original file line number Diff line number Diff line change 16
16
use ApiPlatform \Metadata \Exception \RuntimeException ;
17
17
use ApiPlatform \Metadata \Resource \Factory \ResourceMetadataCollectionFactoryInterface ;
18
18
use ApiPlatform \Metadata \Resource \Factory \ResourceNameCollectionFactoryInterface ;
19
+ use ApiPlatform \OpenApi \Attributes \Webhook ;
19
20
use Symfony \Component \Config \FileLocator ;
20
21
use Symfony \Component \Config \Loader \Loader ;
21
22
use Symfony \Component \Config \Resource \DirectoryResource ;
@@ -57,6 +58,10 @@ public function load(mixed $data, ?string $type = null): RouteCollection
57
58
foreach ($ this ->resourceNameCollectionFactory ->create () as $ resourceClass ) {
58
59
foreach ($ this ->resourceMetadataFactory ->create ($ resourceClass ) as $ resourceMetadata ) {
59
60
foreach ($ resourceMetadata ->getOperations () as $ operationName => $ operation ) {
61
+ if ($ operation ->getOpenapi () instanceof Webhook) {
62
+ continue ;
63
+ }
64
+
60
65
if ($ operation ->getRouteName ()) {
61
66
continue ;
62
67
}
You can’t perform that action at this time.
0 commit comments