|
102 | 102 | use ApiPlatform\Laravel\Security\ResourceAccessChecker;
|
103 | 103 | use ApiPlatform\Laravel\State\AccessCheckerProvider;
|
104 | 104 | use ApiPlatform\Laravel\State\SwaggerUiProcessor;
|
| 105 | +use ApiPlatform\Laravel\State\SwaggerUiProvider; |
105 | 106 | use ApiPlatform\Laravel\State\ValidateProvider;
|
106 | 107 | use ApiPlatform\Metadata\Exception\NotExposedHttpException;
|
107 | 108 | use ApiPlatform\Metadata\Factory\Property\ClassLevelAttributePropertyNameCollectionFactory;
|
@@ -395,8 +396,12 @@ public function register(): void
|
395 | 396 | return new ReadProvider($app->make(CallableProvider::class));
|
396 | 397 | });
|
397 | 398 |
|
| 399 | + $this->app->singleton(SwaggerUiProvider::class, function (Application $app) { |
| 400 | + return new SwaggerUiProvider($app->make(ReadProvider::class), $app->make(OpenApiFactoryInterface::class)); |
| 401 | + }); |
| 402 | + |
398 | 403 | $this->app->singleton(ValidateProvider::class, function (Application $app) {
|
399 |
| - return new ValidateProvider($app->make(ReadProvider::class), $app); |
| 404 | + return new ValidateProvider($app->make(SwaggerUiProvider::class), $app); |
400 | 405 | });
|
401 | 406 |
|
402 | 407 | $this->app->singleton(JsonApiProvider::class, function (Application $app) use ($config) {
|
@@ -587,7 +592,7 @@ public function register(): void
|
587 | 592 | });
|
588 | 593 |
|
589 | 594 | $this->app->singleton(EntrypointAction::class, function (Application $app) use ($config) {
|
590 |
| - return new EntrypointAction($app->make(ResourceNameCollectionFactoryInterface::class), $app->make(ProviderInterface::class), $app->make(ProcessorInterface::class), $config->get('api-platform.formats')); |
| 595 | + return new EntrypointAction($app->make(ResourceNameCollectionFactoryInterface::class), $app->make(ProviderInterface::class), $app->make(ProcessorInterface::class), $config->get('api-platform.docs_formats')); |
591 | 596 | });
|
592 | 597 |
|
593 | 598 | $this->app->singleton(Pagination::class, function () use ($config) {
|
|
0 commit comments