mtrajano / laravel-swagger

Auto generates the swagger documentation of a laravel project based on best practices and simple assumptions
167 stars 71 forks source link

laravel 6 Integration #11

Closed hugef666 closed 4 years ago

hugef666 commented 4 years ago

Hi there, I'm having a new project using the Laravel 6, and found a question for the feature that have been remove the global function of starts_with please to consider about to upgrade it to using the helper class access such like Arr::class and Str::class, thanks.


  at /var/www/integration.laravel/vendor/mtrajano/laravel-swagger/src/Generator.php:104
    100|     protected function getRouteUri(Route $route)
    101|     {
    102|         $uri = $route->uri();
    103| 
  > 104|         if (!starts_with($uri, '/')) {
    105|             $uri = '/' . $uri;
    106|         }
    107| 
    108|         return $uri;

  Exception trace:

  1   Mtrajano\LaravelSwagger\Generator::getRouteUri(Object(Illuminate\Routing\Route))
      /var/www/integration.laravel/vendor/mtrajano/laravel-swagger/src/Generator.php:39

  2   Mtrajano\LaravelSwagger\Generator::generate()
      /var/www/integration.laravel/vendor/mtrajano/laravel-swagger/src/GenerateSwaggerDoc.php:34
mtrajano commented 4 years ago

Hey, thank you for submitting the issue. This has been fixed on v0.6.0