22
22
23
23
<script src =" https://unpkg.com/vue-markdown@2.2.4/dist/vue-markdown.js" ></script >
24
24
<script src =" https://cdnjs.cloudflare.com/ajax/libs/sql-formatter/3.1.0/sql-formatter.min.js" crossorigin =" anonymous" referrerpolicy =" no-referrer" ></script >
25
- < script src = " {{ asset ( ' ./vendor/request-docs/dist/app.js ' ) } } " ></ script >
25
+
26
26
<style >
27
27
[v-cloak ] {
28
28
display : none ;
@@ -130,7 +130,7 @@ class="my-prism-editor"
130
130
</section >
131
131
<h1 class =" font-medium mx-3 mt-3" style =" width : max-content ;min-width :350px ;" >Routes List</h1 >
132
132
<hr class =" border-b border-gray-300" >
133
- <table class =" table-fixed text-sm mt-5" style =" width : max-content " >
133
+ <table class =" table-fixed text-sm mt-5 mb-5 " style =" width : max-content " >
134
134
<tbody >
135
135
@foreach ($docs as $index => $doc )
136
136
<tr v-if =" !docs[{{ $index } } ]['isHidden']" >
@@ -187,8 +187,8 @@ class="inline-flex text-xs"
187
187
<hr class =" border-b border-gray-300" >
188
188
<br >
189
189
@foreach ($docs as $index => $doc )
190
- <section class =" pt-5 pl-2 pr-2 pb-5 border mb-10 rounded bg-white shadow" v-if =" !docs[{{ $index } } ]['isHidden']" >
191
- <div class =" font-sans " id =" {{ $doc [' httpMethod' ] . ' -' . $doc [' uri' ]} }" >
190
+ <section class =" pt-5 pl-2 pr-2 pb-5 border-2 mb-10 rounded bg-white shadow" v-if =" !docs[{{ $index } } ]['isHidden']" >
191
+ <div class =" border-2 rounded " id =" {{ $doc [' httpMethod' ] . ' -' . $doc [' uri' ]} }" >
192
192
<h1 class =" text-sm break-normal text-black bg-indigo-50 break-normal font-sans pb-1 pt-1 text-black" >
193
193
<span class =" w-20
194
194
font-medium
@@ -197,6 +197,8 @@ class="inline-flex text-xs"
197
197
justify-center
198
198
px-2
199
199
py-1
200
+ ml-2
201
+ mr-2
200
202
text-xs
201
203
font-bold
202
204
leading-none
@@ -207,15 +209,13 @@ class="inline-flex text-xs"
207
209
text-{{ in_array (' PATCH' , $doc [' methods' ]) ? ' black' : ' ' } } -100 bg-{{ in_array (' PATCH' , $doc [' methods' ]) ? ' yellow' : ' ' } } -500
208
210
text-{{ in_array (' DELETE ' , $doc [' methods' ]) ? ' white' : ' ' } } bg-{{ in_array (' DELETE ' , $doc [' methods' ]) ? ' black' : ' ' } }
209
211
" >
210
- {{ $doc [' methods' ][0 ]} }
212
+ {{ $doc [' methods' ][0 ]} }
211
213
</span >
212
214
<span class =" " >
213
215
<a href =" #{{ $doc [' uri' ]} }" >{{ $doc [' uri' ]} } </a >
214
216
</span >
215
217
</h1 >
216
218
</div >
217
- <hr class =" border-b border-grey-light" >
218
-
219
219
<table class =" table-fixed text-sm mt-5" >
220
220
<tbody >
221
221
<tr >
@@ -245,12 +245,15 @@ class="inline-flex text-xs"
245
245
</tbody >
246
246
</table >
247
247
<div v-if =" docs[{{ $index } } ]['docBlock']" class =" border-2 mr-4 mt-4 p-4 rounded text-sm" >
248
- <h3 class =" font-bold" >LRD Docs</h3 >
249
- <vue-markdown >{!! $doc [' docBlock' ] ! !} </vue-markdown >
248
+ <h3 class =" font-bold" >Description</h3 >
249
+ <hr >
250
+ <vue-markdown class =" mt-2" >{!! $doc [' docBlock' ] ! !} </vue-markdown >
250
251
</div >
251
- <br >
252
252
@if (! empty ($doc [' rules' ]) )
253
- <table class =" table-fixed align-left text-sm mt-5" >
253
+ <div class =" border-2 mr-4 mt-4 p-4 rounded" >
254
+ <h3 class =" font-bold" >Attributes</h3 >
255
+ <hr >
256
+ <table class =" table-fixed align-left text-sm mt-3" >
254
257
<thead class =" border" >
255
258
<tr class =" border" >
256
259
<th class =" border border-gray-300 pl-2 pr-16 pt-1 pb-1 w-min text-left bg-gray-200" >No.</th >
@@ -319,7 +322,7 @@ class="inline-flex text-xs"
319
322
<div class =" font-mono" >
320
323
@foreach ($rules as $rule )
321
324
@foreach (explode (' |' , $rule ) as $r )
322
- @if (! in_array ($r , [' required' , ' integer' , ' string' , ' boolean' , ' array' , ' nullable' , ' bail' , ' file' , ' image' ]) )
325
+ @if (! in_array ($r , [' required' , ' integer' , ' string' , ' boolean' , ' array' , ' nullable' , ' bail' , ' file' , ' image' , ' numeric ' ]) )
323
326
{{ $r } }
324
327
@if (! $loop -> last )
325
328
<span class =" text-gray-900 font-bold" >|</span >
@@ -333,6 +336,7 @@ class="inline-flex text-xs"
333
336
@endforeach
334
337
</tbody >
335
338
</table >
339
+ </div >
336
340
@endif
337
341
<button
338
342
class =" hover:bg-red-500 font-semibold hover:text-white mt-2 pl-5 pr-5 border-gray-700 hover:border-transparent shadow-inner border-2 rounded-full"
@@ -559,6 +563,9 @@ class="my-prism-editor"
559
563
validations .max = 100
560
564
}
561
565
}
566
+ if (rule .match (/ numeric/ )) {
567
+ validations .isInteger = true
568
+ }
562
569
})
563
570
564
571
if (validations .isString ) {
0 commit comments