File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 165165use ApiPlatform \Metadata \UrlGeneratorInterface ;
166166use ApiPlatform \Metadata \Util \Inflector ;
167167use ApiPlatform \Metadata \Util \ReflectionClassRecursiveIterator ;
168+ use ApiPlatform \OpenApi \Command \OpenApiCommand ;
168169use ApiPlatform \OpenApi \Factory \OpenApiFactory ;
169170use ApiPlatform \OpenApi \Factory \OpenApiFactoryInterface ;
170171use ApiPlatform \OpenApi \Options ;
@@ -842,6 +843,10 @@ public function register(): void
842843 );
843844 });
844845
846+ $ this ->app ->singleton (OpenApiCommand::class, function (Application $ app ) {
847+ return new OpenApiCommand ($ app ->make (OpenApiFactory::class), $ app ->make (Serializer::class));
848+ });
849+
845850 $ this ->app ->bind (DefinitionNameFactoryInterface::class, DefinitionNameFactory::class);
846851 $ this ->app ->singleton (DefinitionNameFactory::class, function (Application $ app ) {
847852 /** @var ConfigRepository */
@@ -1100,6 +1105,7 @@ function (Application $app) {
11001105 Console \InstallCommand::class,
11011106 Console \Maker \MakeStateProcessorCommand::class,
11021107 Console \Maker \MakeStateProviderCommand::class,
1108+ OpenApiCommand::class,
11031109 ]);
11041110 }
11051111
Original file line number Diff line number Diff line change 3232 "api-platform/metadata" : " ^4.1" ,
3333 "api-platform/state" : " ^4.1" ,
3434 "symfony/console" : " ^6.4 || ^7.0" ,
35+ "symfony/filesystem" : " ^7.2" ,
3536 "symfony/property-access" : " ^6.4 || ^7.0" ,
3637 "symfony/serializer" : " ^6.4 || ^7.0"
3738 },
You can’t perform that action at this time.
0 commit comments