Skip to content

Commit dc38c3a

Browse files
committed
v3
1 parent cd33096 commit dc38c3a

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

resources/definitions/controllers/openapi_controller.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
use function DI\get;
1414

1515
return [
16+
OpenApiController::class => create()
17+
->constructor(
18+
openApiConfiguration: get(OpenApiConfiguration::class),
19+
openApiDocumentManager: get(OpenApiDocumentManagerInterface::class),
20+
responseFactory: get(ResponseFactoryInterface::class),
21+
streamFactory: get(StreamFactoryInterface::class),
22+
),
23+
1624
'router.descriptor_loader.resources' => add([
17-
create(OpenApiController::class)
18-
->constructor(
19-
openApiConfiguration: get(OpenApiConfiguration::class),
20-
openApiDocumentManager: get(OpenApiDocumentManagerInterface::class),
21-
responseFactory: get(ResponseFactoryInterface::class),
22-
streamFactory: get(StreamFactoryInterface::class),
23-
),
25+
OpenApiController::class,
2426
]),
2527
];

resources/definitions/controllers/swagger_controller.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
use function DI\get;
1313

1414
return [
15+
SwaggerController::class => create()
16+
->constructor(
17+
swaggerConfiguration: get(SwaggerConfiguration::class),
18+
responseFactory: get(ResponseFactoryInterface::class),
19+
streamFactory: get(StreamFactoryInterface::class),
20+
),
21+
1522
'router.descriptor_loader.resources' => add([
16-
create(SwaggerController::class)
17-
->constructor(
18-
swaggerConfiguration: get(SwaggerConfiguration::class),
19-
responseFactory: get(ResponseFactoryInterface::class),
20-
streamFactory: get(StreamFactoryInterface::class),
21-
),
23+
SwaggerController::class,
2224
]),
2325
];

resources/definitions/openapi.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
use function DI\get;
1818

1919
return [
20-
'router.openapi.initial_document.info' => [
21-
'title' => 'API',
22-
'version' => '1.0.0',
23-
],
24-
2520
'router.openapi.initial_document' => [
2621
'openapi' => OpenApiConfiguration::VERSION,
2722
'info' => get('router.openapi.initial_document.info'),
28-
'jsonSchemaDialect' => OpenApiConfiguration::JSON_SCHEMA_DIALECT,
23+
],
24+
25+
'router.openapi.initial_document.info' => [
26+
'title' => 'API',
27+
'version' => '1.0.0',
2928
],
3029

3130
'router.openapi.initial_operation' => [

0 commit comments

Comments
 (0)