src/Leevel/Router/OpenApiRouter.php
protected function parseOpenApiPath(PathItem $path, array $routers): array
    {
        foreach ($this->methods as $m) {
            $method = $path->{$m};

            // 忽略已删除和带有忽略标记的路由
            if ($this->isRouterIgnore($method, $path->path)) {
                continue;
            }

            $router = [];

            // 支持的自定义路由字段
            $router = $this->parseRouterField($method);

            // 根据源代码生成绑定
            $router = $this->parseRouterBind($method, $router);

            // 解析中间件
            $router = $this->parseRouterMiddlewares($router);

            // 解析域名
            $router = $this->parseRouterDomain($router);

            // 解析基础路径
            list($prefix, $groupPrefix, $routerPath) = $this->parseRouterPath($path->path, $this->groupPaths, $this->groups);

            // 解析路由正则
            if ($this->isStaticRouter($routerPath)) {
                $routers[$m]['static'][$routerPath] = $router;
            } else {
                $routers[$m][$prefix][$groupPrefix][$routerPath] =
                    $this->parseRouterRegex($routerPath, $router);
            }
        }

        return $routers;
    }
protected function parseOpenApiPath(PathItem $path, array $routers): array
    {
        foreach ($this->methods as $m) {
            $method = $path->{$m};

            // 忽略已删除和带有忽略标记的路由
            if ($this->isRouterIgnore($method, $path->path)) {
                continue;
            }

            $router = [];

            // 支持的自定义路由字段
            $router = $this->parseRouterField($method);

            // 根据源代码生成绑定
            $router = $this->parseRouterBind($method, $router);

            // 解析中间件
            $router = $this->parseRouterMiddlewares($router);

            // 解析域名
            $router = $this->parseRouterDomain($router);

            // 解析基础路径
            list($prefix, $groupPrefix, $routerPath) = $this->parseRouterPath($path->path, $this->groupPaths, $this->groups);

            // 解析路由正则
            if ($this->isStaticRouter($routerPath)) {
                $routers[$m]['static'][$routerPath] = $router;
            } else {
                $routers[$m][$prefix][$groupPrefix][$routerPath] =
                    $this->parseRouterRegex($routerPath, $router);
            }
        }

        return $routers;
    }
解析 openApi 每一项路径.

@param \OpenApi\Annotations\PathItem $path
@param array                         $routers

@return array