Browse Source

Fix Postman collection url replacement

Oleksiy Petlyuk 5 years ago
parent
commit
bd1e55ad79
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Writing/Writer.php

+ 1 - 1
src/Writing/Writer.php

@@ -283,7 +283,7 @@ class Writer
             $contents = str_replace('href="css/style.css"', 'href="/docs/css/style.css"', $contents);
             $contents = str_replace('src="js/all.js"', 'src="/docs/js/all.js"', $contents);
             $contents = str_replace('src="images/', 'src="/docs/images/', $contents);
-            $contents = preg_replace('#href="http://.+?/docs/collection.json"#', 'href="{{ route("apidoc", ["format" => ".json"]) }}"', $contents);
+            $contents = preg_replace('#href="https?://.+?/docs/collection.json"#', 'href="{{ route("apidoc", ["format" => ".json"]) }}"', $contents);
             file_put_contents("$this->outputPath/index.blade.php", $contents);
         }
     }