File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -77,22 +77,16 @@ need to decorate `api_platform.openapi.factory`.
7777In the following example, we will see how to override the title and the base path URL of the Swagger documentation and add a custom filter for
7878the ` GET ` operation of ` /foos ` path.
7979
80- ``` yaml
81- # api/config/services.yaml
82- App\OpenApi\OpenApiFactory :
83- decorates : ' api_platform.openapi.factory'
84- arguments : ['@App\OpenApi\OpenApiFactory.inner']
85- autoconfigure : false
86- ` ` `
87-
8880``` php
8981<?php
9082namespace App\OpenApi;
9183
9284use ApiPlatform\OpenApi\Factory\OpenApiFactoryInterface;
9385use ApiPlatform\OpenApi\OpenApi;
9486use ApiPlatform\OpenApi\Model;
87+ use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
9588
89+ #[AsDecorator(decorates: 'api_platform.openapi.factory')]
9690class OpenApiFactory implements OpenApiFactoryInterface
9791{
9892
You can’t perform that action at this time.
0 commit comments