|
@@ -79,7 +79,7 @@ class GenerateDocumentation extends Command
|
|
|
|
|
|
$infoText = view('apidoc::partials.info')
|
|
|
->with('outputPath', ltrim($outputPath, 'public/'))
|
|
|
- ->with('showPostmanCollectionButton', config('apidoc.postman'));
|
|
|
+ ->with('showPostmanCollectionButton', config('apidoc.postman.enabled') ?? config('apidoc.postman'));
|
|
|
|
|
|
$parsedRouteOutput = $parsedRoutes->map(function ($routeGroup) {
|
|
|
return $routeGroup->map(function ($route) {
|
|
@@ -135,7 +135,7 @@ class GenerateDocumentation extends Command
|
|
|
->with('prependMd', $prependFileContents)
|
|
|
->with('appendMd', $appendFileContents)
|
|
|
->with('outputPath', config('apidoc.output'))
|
|
|
- ->with('showPostmanCollectionButton', config('apidoc.postman'))
|
|
|
+ ->with('showPostmanCollectionButton', config('apidoc.postman.enabled') ?? config('apidoc.postman'))
|
|
|
->with('parsedRoutes', $parsedRouteOutput);
|
|
|
|
|
|
if (! is_dir($outputPath)) {
|
|
@@ -153,7 +153,7 @@ class GenerateDocumentation extends Command
|
|
|
->with('prependMd', $prependFileContents)
|
|
|
->with('appendMd', $appendFileContents)
|
|
|
->with('outputPath', config('apidoc.output'))
|
|
|
- ->with('showPostmanCollectionButton', config('apidoc.postman'))
|
|
|
+ ->with('showPostmanCollectionButton', config('apidoc.postman.enabled') ?? config('apidoc.postman'))
|
|
|
->with('parsedRoutes', $parsedRouteOutput);
|
|
|
|
|
|
file_put_contents($compareFile, $compareMarkdown);
|
|
@@ -166,7 +166,7 @@ class GenerateDocumentation extends Command
|
|
|
|
|
|
$this->info('Wrote HTML documentation to: '.$outputPath.'/index.html');
|
|
|
|
|
|
- if (config('apidoc.postman')) {
|
|
|
+ if (config('apidoc.postman.enabled') ?? config('apidoc.postman')) {
|
|
|
$this->info('Generating Postman collection');
|
|
|
|
|
|
file_put_contents($outputPath.DIRECTORY_SEPARATOR.'collection.json', $this->generatePostmanCollection($parsedRoutes));
|