File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ abstract class BaseDriver implements SwaggerDriverContract
1010
1111 public function __construct ()
1212 {
13- $ this ->tempFilePath = storage_path ('temp_documentation.json ' );
13+ $ prodDir = config ('auto-doc.documentation_directory ' );
14+ if (!is_dir ($ prodDir )) {
15+ mkdir ($ prodDir );
16+ }
17+ $ this ->tempFilePath = $ prodDir .DIRECTORY_SEPARATOR .'temp_documentation.json ' ;
1418 }
1519
1620 public function saveTmpData ($ data ): void
Original file line number Diff line number Diff line change @@ -12,10 +12,9 @@ class LocalDriver extends BaseDriver
1212 public function __construct ()
1313 {
1414 parent ::__construct ();
15+ $ this ->prodFilePath = config ('auto-doc.documentation_directory ' ).DIRECTORY_SEPARATOR .config ('auto-doc.drivers.local.production_path ' );
1516
16- $ this ->prodFilePath = config ('auto-doc.drivers.local.production_path ' );
17-
18- if (empty ($ this ->prodFilePath )) {
17+ if (!preg_match ('/\/[\w]+\.json/ms ' ,$ this ->prodFilePath )) {
1918 throw new MissedProductionFilePathException ();
2019 }
2120 }
You can’t perform that action at this time.
0 commit comments