-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetgenApiPlatformExtrasBundle.php
More file actions
43 lines (36 loc) · 1.34 KB
/
Copy pathNetgenApiPlatformExtrasBundle.php
File metadata and controls
43 lines (36 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
namespace Netgen\ApiPlatformExtras;
use Netgen\ApiPlatformExtras\DependencyInjection\CompilerPass\IriTemplateGeneratorCompilerPass;
use Netgen\ApiPlatformExtras\DependencyInjection\CompilerPass\JwtRefreshCompilerPass;
use Netgen\ApiPlatformExtras\DependencyInjection\CompilerPass\SchemaDecorationCompilerPass;
use Netgen\ApiPlatformExtras\DependencyInjection\CompilerPass\SchemaProcessorCompilerPass;
use Netgen\ApiPlatformExtras\OpenApi\Processor\OpenApiProcessorInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use function dirname;
final class NetgenApiPlatformExtrasBundle extends Bundle
{
public function getPath(): string
{
return dirname(__DIR__);
}
public function build(ContainerBuilder $container): void
{
$container
->addCompilerPass(
new IriTemplateGeneratorCompilerPass(),
)
->addCompilerPass(
new SchemaProcessorCompilerPass(),
)
->addCompilerPass(
new SchemaDecorationCompilerPass(),
)
->addCompilerPass(
new JwtRefreshCompilerPass(),
);
$container->registerForAutoconfiguration(OpenApiProcessorInterface::class)
->addTag('netgen_api_platform_extras.open_api_processor');
}
}