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 2222use ApiPlatform \Metadata \HttpOperation ;
2323use ApiPlatform \Metadata \Resource \Factory \ResourceMetadataCollectionFactoryInterface ;
2424use ApiPlatform \Metadata \Resource \Factory \ResourceNameCollectionFactoryInterface ;
25+ use ApiPlatform \OpenApi \Attributes \Webhook ;
2526use Illuminate \Support \Facades \Route ;
2627
2728$ globalMiddlewares = config ()->get ('api-platform.routes.middleware ' , []);
3435 foreach ($ resourceNameCollectionFactory ->create () as $ resourceClass ) {
3536 foreach ($ resourceMetadataFactory ->create ($ resourceClass ) as $ resourceMetadata ) {
3637 foreach ($ resourceMetadata ->getOperations () as $ operation ) {
38+ if ($ operation ->getOpenapi () instanceof Webhook) {
39+ continue ;
40+ }
41+
3742 if ($ operation ->getRouteName ()) {
3843 continue ;
3944 }
Original file line number Diff line number Diff line change 1616use ApiPlatform \Metadata \Exception \RuntimeException ;
1717use ApiPlatform \Metadata \Resource \Factory \ResourceMetadataCollectionFactoryInterface ;
1818use ApiPlatform \Metadata \Resource \Factory \ResourceNameCollectionFactoryInterface ;
19+ use ApiPlatform \OpenApi \Attributes \Webhook ;
1920use Symfony \Component \Config \FileLocator ;
2021use Symfony \Component \Config \Loader \Loader ;
2122use Symfony \Component \Config \Resource \DirectoryResource ;
@@ -57,6 +58,10 @@ public function load(mixed $data, ?string $type = null): RouteCollection
5758 foreach ($ this ->resourceNameCollectionFactory ->create () as $ resourceClass ) {
5859 foreach ($ this ->resourceMetadataFactory ->create ($ resourceClass ) as $ resourceMetadata ) {
5960 foreach ($ resourceMetadata ->getOperations () as $ operationName => $ operation ) {
61+ if ($ operation ->getOpenapi () instanceof Webhook) {
62+ continue ;
63+ }
64+
6065 if ($ operation ->getRouteName ()) {
6166 continue ;
6267 }
You can’t perform that action at this time.
0 commit comments