File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 16
16
// \App\Http\Middleware\NotFoundWhenProduction::class,
17
17
],
18
18
19
+ /*
20
+ * Default headers shown on the request headers editor
21
+ */
22
+ 'default_request_headers ' => [
23
+ 'Accept ' => 'application/json ' ,
24
+ 'X-CSRF-TOKEN ' => '' ,
25
+ 'Authorization ' => 'Bearer ' ,
26
+ ],
27
+
28
+ /*
29
+ * Show development relevant metadata on endpoints
30
+ */
31
+ 'show_development_metadata ' => true ,
32
+
19
33
/**
20
34
* Path to to static HTML if using command line.
21
35
*/
Original file line number Diff line number Diff line change @@ -212,10 +212,11 @@ class="inline-flex text-xs"
212
212
{{ $doc [' methods' ][0 ]} }
213
213
</span >
214
214
<span class =" " >
215
- <a href =" #{{ $doc [' uri' ]} }" >{{ $doc [' uri' ]} } </a >
215
+ <a href =" #{{ $doc [' httpMethod ' ] . ' - ' . $doc [ ' uri' ]} }" >{{ $doc [' uri' ]} } </a >
216
216
</span >
217
217
</h1 >
218
218
</div >
219
+ @if (config (' request-docs.show_development_metadata' ) )
219
220
<table class =" table-fixed text-sm mt-5" >
220
221
<tbody >
221
222
<tr >
@@ -244,6 +245,7 @@ class="inline-flex text-xs"
244
245
@endforeach
245
246
</tbody >
246
247
</table >
248
+ @endif
247
249
<div v-if =" docs[{{ $index } } ]['docBlock']" class =" border-2 mr-4 mt-4 p-4 rounded text-sm" >
248
250
<h3 class =" font-bold" >Description</h3 >
249
251
<hr >
@@ -660,9 +662,7 @@ class="my-prism-editor"
660
662
filterTerm: ' '
661
663
},
662
664
created : function () {
663
- axios .defaults .headers .common [' X-CSRF-TOKEN' ] = document .querySelector (' meta[name="csrf-token"]' ).getAttribute (' content' ),
664
- axios .defaults .headers .common [' Authorization' ] = ' Bearer '
665
- this .requestHeaders = JSON .stringify (axios .defaults .headers .common , null , 2 )
665
+ this .requestHeaders = JSON .stringify ({!! json_encode (config (' request-docs.default_request_headers' )) ! !} , null , 2 )
666
666
},
667
667
methods: {
668
668
highlightSidebar (idx ) {
You can’t perform that action at this time.
0 commit comments