File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ docker compose exec php \
50
50
Symfony allows to [ decorate services] ( https://symfony.com/doc/current/service_container/service_decoration.html ) , here we
51
51
need to decorate ` api_platform.openapi.factory ` .
52
52
53
- In the following example, we will see how to override the title of the Swagger documentation and add a custom filter for
53
+ In 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
54
54
the ` GET ` operation of ` /foos ` path.
55
55
56
56
``` yaml
@@ -95,6 +95,9 @@ class OpenApiFactory implements OpenApiFactoryInterface
95
95
$openApi = $openApi->withExtensionProperty('key', 'Custom x-key value');
96
96
$openApi = $openApi->withExtensionProperty('x-value', 'Custom x-value value');
97
97
98
+ // to define base path URL
99
+ $openApi = $openApi->withServers([new Model\Server('https://foo.bar')]);
100
+
98
101
return $openApi;
99
102
}
100
103
}
You can’t perform that action at this time.
0 commit comments