From d79be997020193d06b98fdf202552c895a6c5a1b Mon Sep 17 00:00:00 2001
From: shalvah
Body: {{ $parameter['type'] }}
{!! Parsedown::instance()->text($parameter['description'] ?? '') !!}
- @foreach($parameter['__fields'] as $subfieldName => $subfield)
+
+
@component('scribe::components.field-details', [
'name' => $parameter['name'],
'type' => $parameter['type'] ?? 'string',
@@ -38,7 +38,6 @@
])
@endcomponent
-
@foreach($parameter['__fields'] as $subfieldName => $subfield)
@if(!empty($subfield['__fields']))
@component('scribe::components.body-parameters', ['parameters' => [$subfieldName => $subfield], 'endpointId' => $endpointId,])
diff --git a/resources/views/partials/example-requests/bash.md.blade.php b/resources/views/partials/example-requests/bash.md.blade.php
index d9bacdc9..220edbc0 100644
--- a/resources/views/partials/example-requests/bash.md.blade.php
+++ b/resources/views/partials/example-requests/bash.md.blade.php
@@ -23,6 +23,7 @@
@endforeach
@endforeach
@elseif(count($endpoint->cleanBodyParameters))
- --data "{!! addslashes(json_encode($endpoint->cleanBodyParameters, JSON_UNESCAPED_UNICODE)) !!}"
+ --data "{!! addslashes(json_encode($endpoint->cleanBodyParameters, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)) !!}"
@endif
-```
+
+```
\ No newline at end of file
diff --git a/resources/views/themes/default/index.blade.php b/resources/views/themes/default/index.blade.php
index cfd65ab4..a25c0efe 100644
--- a/resources/views/themes/default/index.blade.php
+++ b/resources/views/themes/default/index.blade.php
@@ -30,7 +30,7 @@
-
+
MENU
diff --git a/src/Extracting/ApiDetails.php b/src/Extracting/ApiDetails.php
index ab4bf50a..51dcadcf 100644
--- a/src/Extracting/ApiDetails.php
+++ b/src/Extracting/ApiDetails.php
@@ -52,7 +52,6 @@ public function writeMarkdownFiles(): void
ConsoleOutputUtils::info('Extracted intro and auth Markdown files to: ' . $this->markdownOutputPath);
}
-
public function writeIntroMarkdownFile(): void
{
$introMarkdownFile = $this->markdownOutputPath . '/intro.md';
diff --git a/src/Writing/HtmlWriter.php b/src/Writing/HtmlWriter.php
index bb71dad7..55c300a0 100644
--- a/src/Writing/HtmlWriter.php
+++ b/src/Writing/HtmlWriter.php
@@ -94,8 +94,9 @@ protected function transformMarkdownFileToHTML(string $markdownFilePath): string
protected function getMetadata(): array
{
- // NB:These paths are wrong for laravel type but will be set correctly by the Writer class
$links = [];
+
+ // NB:These paths are wrong for laravel type but will be set correctly by the Writer class
if ($this->config->get('postman.enabled', true)) {
$links[] = 'View Postman collection';
}
@@ -120,7 +121,7 @@ protected function getMetadata(): array
'last_updated' => date("F j Y"),
'auth' => $auth,
'try_it_out' => $this->config->get('try_it_out'),
- 'links' => $links + ['Documentation powered by Scribe ✍'],
+ 'links' => array_merge($links, ['Documentation powered by Scribe ✍']),
];
}
}