src/Generator.php
protected function populateServers()
    {
        if (config('l5-swagger.paths.base') !== null) {
            if ($this->isOpenApi()) {
                $this->swagger->servers = [
                    new \OpenApi\Annotations\Server(['url' => config('l5-swagger.paths.base')]),
                ];
            }

            if (! $this->isOpenApi()) {
                $this->swagger->basePath = config('l5-swagger.paths.base');
            }
        }

        return $this;
    }
protected function populateServers()
    {
        if (config('l5-swagger.paths.base') !== null) {
            if ($this->isOpenApi()) {
                $this->swagger->servers = [
                    new \OpenApi\Annotations\Server(['url' => config('l5-swagger.paths.base')]),
                ];
            }

            if (! $this->isOpenApi()) {
                $this->swagger->basePath = config('l5-swagger.paths.base');
            }
        }

        return $this;
    }
protected function populateServers ( ) { if ( config ( 'l5-swagger.paths.base' ) !== null ) { if ( $ this -> isOpenApi ( ) ) { $ this -> swagger -> servers = [ new \ OpenApi \ Annotations \ Server ( [ 'url' => config ( 'l5-swagger.paths.base' ) ] ) , ] ; } if ( ! $ this -> isOpenApi ( ) ) { $ this -> swagger -> basePath = config ( 'l5-swagger.paths.base' ) ; } } return $ this ; }
Generate servers section or basePath depending on Swagger version.

@return Generator
Generate servers section or basePath depending on Swagger version .