Skip to content

Commit 8f97f28

Browse files
committed
v3
1 parent 8a42264 commit 8f97f28

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

resources/definitions/loaders/descriptor_loader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
declare(strict_types=1);
44

5+
use Psr\SimpleCache\CacheInterface;
56
use Sunrise\Http\Router\Loader\DescriptorLoader;
67
use Sunrise\Http\Router\Loader\DescriptorLoaderInterface;
78

@@ -11,7 +12,7 @@
1112

1213
return [
1314
'router.descriptor_loader.resources' => [],
14-
'router.descriptor_loader.cache' => null,
15+
'router.descriptor_loader.cache' => get(CacheInterface::class),
1516

1617
'router.loaders' => add([
1718
get(DescriptorLoaderInterface::class),

resources/definitions/openapi.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515

1616
use function DI\create;
1717
use function DI\get;
18+
use function DI\string;
1819

1920
return [
2021
'router.openapi.initial_document' => [
2122
'openapi' => OpenApiConfiguration::VERSION,
22-
'info' => [
23-
'title' => 'API',
24-
'version' => '1.0.0',
25-
],
23+
'info' => get('router.openapi.initial_document.info'),
24+
],
25+
26+
'router.openapi.initial_document.info' => [
27+
'title' => string('{app.name}@{app.env}'),
28+
'version' => get('app.version'),
2629
],
2730

2831
'router.openapi.initial_operation' => [

0 commit comments

Comments
 (0)