Browse Source

Merge branch 'patch-1' of https://github.com/kiberzauras/laravel-apidoc-generator into kiberzauras-patch-1

Marcel Pociot 8 years ago
parent
commit
ce81f238b7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Mpociot/ApiDoc/Generators/AbstractGenerator.php

+ 3 - 0
src/Mpociot/ApiDoc/Generators/AbstractGenerator.php

@@ -76,6 +76,9 @@ abstract class AbstractGenerator
             return [trim($split[0]) => trim($split[1])];
         })->collapse()->toArray();
 
+        //Changes url with parameters like /users/{user} to /users/1
+        $uri = preg_replace('/{(.*)}/', 1, $uri);
+
         return $this->callRoute(array_shift($methods), $uri, [], [], [], $headers);
     }