@@ -44,35 +44,35 @@ public static function fromSrcDirectory(): self
4444
4545 public function __invoke (): RouteCollection
4646 {
47- $ fullSwagger = \Swagger \scan ($ this ->finder );
47+ $ openApi = \Swagger \scan ($ this ->finder );
4848 $ routeCollection = new RouteCollection ();
4949
50- $ globalFormatSuffixConfig = FormatSuffixConfig::fromAnnotation ($ fullSwagger );
50+ $ globalFormatSuffixConfig = FormatSuffixConfig::fromAnnotation ($ openApi );
5151
52- foreach ($ fullSwagger ->paths as $ path ) {
52+ foreach ($ openApi ->paths as $ path ) {
5353 $ pathFormatSuffixConfig = FormatSuffixConfig::fromAnnotation ($ path , $ globalFormatSuffixConfig );
5454
55- $ this ->addRouteFromSwaggerOperation ($ routeCollection , $ path ->get , $ pathFormatSuffixConfig );
56- $ this ->addRouteFromSwaggerOperation ($ routeCollection , $ path ->put , $ pathFormatSuffixConfig );
57- $ this ->addRouteFromSwaggerOperation ($ routeCollection , $ path ->post , $ pathFormatSuffixConfig );
58- $ this ->addRouteFromSwaggerOperation ($ routeCollection , $ path ->delete , $ pathFormatSuffixConfig );
59- $ this ->addRouteFromSwaggerOperation ($ routeCollection , $ path ->options , $ pathFormatSuffixConfig );
60- $ this ->addRouteFromSwaggerOperation ($ routeCollection , $ path ->head , $ pathFormatSuffixConfig );
61- $ this ->addRouteFromSwaggerOperation ($ routeCollection , $ path ->patch , $ pathFormatSuffixConfig );
55+ $ this ->addRouteFromOpenApiOperation ($ routeCollection , $ path ->get , $ pathFormatSuffixConfig );
56+ $ this ->addRouteFromOpenApiOperation ($ routeCollection , $ path ->put , $ pathFormatSuffixConfig );
57+ $ this ->addRouteFromOpenApiOperation ($ routeCollection , $ path ->post , $ pathFormatSuffixConfig );
58+ $ this ->addRouteFromOpenApiOperation ($ routeCollection , $ path ->delete , $ pathFormatSuffixConfig );
59+ $ this ->addRouteFromOpenApiOperation ($ routeCollection , $ path ->options , $ pathFormatSuffixConfig );
60+ $ this ->addRouteFromOpenApiOperation ($ routeCollection , $ path ->head , $ pathFormatSuffixConfig );
61+ $ this ->addRouteFromOpenApiOperation ($ routeCollection , $ path ->patch , $ pathFormatSuffixConfig );
6262 }
6363
6464 $ this ->routeNames = [];
6565
6666 return $ routeCollection ;
6767 }
6868
69- private function addRouteFromSwaggerOperation (RouteCollection $ routeCollection , ?Operation $ operation , FormatSuffixConfig $ parentFormatSuffixConfig ): void
69+ private function addRouteFromOpenApiOperation (RouteCollection $ routeCollection , ?Operation $ operation , FormatSuffixConfig $ parentFormatSuffixConfig ): void
7070 {
7171 if (null === $ operation ) {
7272 return ;
7373 }
7474
75- $ controller = $ this ->getControllerFromSwaggerOperation ($ operation );
75+ $ controller = $ this ->getControllerFromOpenApiOperation ($ operation );
7676 $ name = $ this ->getRouteName ($ operation , $ controller );
7777 $ route = $ this ->createRoute ($ operation , $ controller , $ parentFormatSuffixConfig );
7878 $ routeCollection ->add ($ name , $ route );
@@ -105,7 +105,7 @@ private function createRoute(Operation $operation, string $controller, FormatSuf
105105 return $ route ;
106106 }
107107
108- private function getControllerFromSwaggerOperation (Operation $ operation ): string
108+ private function getControllerFromOpenApiOperation (Operation $ operation ): string
109109 {
110110 $ classOrService = ltrim ($ operation ->_context ->fullyQualifiedName ($ operation ->_context ->class ), '\\' );
111111
0 commit comments