-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfiguration.php
More file actions
88 lines (81 loc) · 4.12 KB
/
Copy pathConfiguration.php
File metadata and controls
88 lines (81 loc) · 4.12 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
declare(strict_types=1);
namespace Netgen\ApiPlatformExtras\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
final readonly class Configuration implements ConfigurationInterface
{
public function __construct(private ExtensionInterface $extension) {}
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder($this->extension->getAlias());
$rootNode = $treeBuilder->getRootNode();
$rootNode
->children()
->arrayNode('features')
->children()
->arrayNode('http_cache')
->canBeEnabled()
->end()
->arrayNode('schema_decoration')
->canBeEnabled()
->children()
->booleanNode('default_required_properties')
->defaultFalse()
->info('Mark schema properties as required by default when type is not nullable.')
->end()
->booleanNode('jsonld_update_schema')
->defaultFalse()
->info('Add @id as optional property to all POST, PUT and PATCH schemas.')
->end()
->end()
->end()
->arrayNode('simple_normalizer')
->canBeEnabled()
->end()
->arrayNode('jwt_refresh')
->canBeEnabled()
->addDefaultsIfNotSet()
->children()
->booleanNode('auto_refresh_cookie')
->defaultFalse()
->info('Will refresh jwt cookie during request cycle if valid refresh token present and enabled.')
->end()
->booleanNode('auto_refresh_header')
->defaultFalse()
->info('Will refresh jwt header during request cycle if valid refresh token present and enabled.')
->end()
->booleanNode('user_aware')
->defaultFalse()
->info('Will check if user provider supports class refresh token was created from.')
->end()
->arrayNode('ignored_routes')
->scalarPrototype()->end()
->defaultValue([])
->info('Skip auto refresh if route matches by name.')
->end()
->arrayNode('ignored_paths')
->scalarPrototype()->end()
->defaultValue([])
->info('Skip auto refresh if route matches path.')
->end()
->arrayNode('allowed_firewalls')
->scalarPrototype()->end()
->defaultValue([])
->info('Skip auto refresh if resolved firewall not matching allowed.')
->end()
->end()
->end()
->arrayNode('iri_template_generator')
->canBeEnabled()
->end()
->arrayNode('schema_processor')
->canBeEnabled()
->end()
->end()
->end()
->end();
return $treeBuilder;
}
}