File tree Expand file tree Collapse file tree 5 files changed +30
-36
lines changed Expand file tree Collapse file tree 5 files changed +30
-36
lines changed Original file line number Diff line number Diff line change @@ -325,7 +325,6 @@ public function toArray(): array
325
325
{
326
326
$ result = [
327
327
'uri ' => $ this ->uri ,
328
- 'methods ' => $ this ->methods ,
329
328
'middlewares ' => $ this ->middlewares ,
330
329
'controller ' => $ this ->controller ,
331
330
'controller_full_path ' => $ this ->controllerFullPath ,
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export default function App() {
47
47
setHost ( domain )
48
48
url = domain + "/request-docs/api"
49
49
}
50
-
50
+
51
51
if ( url ) {
52
52
// extract host from url
53
53
const domain = url ?. split ( '/' ) . slice ( 0 , 3 ) . join ( '/' ) ;
@@ -131,21 +131,19 @@ export default function App() {
131
131
</ div >
132
132
< div className = "pt-10 col-span-7" >
133
133
{ lrdDocsJson . map ( ( lrdDocsItem ) => (
134
- lrdDocsItem . methods . map ( ( method ) => (
135
- < div key = { shortid . generate ( ) } >
136
- < div className = "min-h-screen" >
137
- < div className = "main-grid grid grid-cols-10 gap-2" >
138
- < div className = "col-span-4 ml-5" >
139
- < ApiInfo lrdDocsItem = { lrdDocsItem } method = { method } />
140
- </ div >
141
- < div className = "col-span-5 ml-5" >
142
- < ApiAction lrdDocsItem = { lrdDocsItem } method = { method } host = { host } />
143
- </ div >
134
+ < div key = { shortid . generate ( ) } >
135
+ < div className = "min-h-screen" >
136
+ < div className = "main-grid grid grid-cols-10 gap-2" >
137
+ < div className = "col-span-4 ml-5" >
138
+ < ApiInfo lrdDocsItem = { lrdDocsItem } method = { lrdDocsItem . http_method } />
139
+ </ div >
140
+ < div className = "col-span-5 ml-5" >
141
+ < ApiAction lrdDocsItem = { lrdDocsItem } method = { lrdDocsItem . http_method } host = { host } />
144
142
</ div >
145
143
</ div >
146
- < div className = "divider" > </ div >
147
144
</ div >
148
- ) )
145
+ < div className = "divider" > </ div >
146
+ </ div >
149
147
) ) }
150
148
</ div >
151
149
</ div >
Original file line number Diff line number Diff line change @@ -20,26 +20,24 @@ export default function Sidebar(props: Props) {
20
20
</ h2 >
21
21
< ul >
22
22
{ lrdDocsJson . map ( ( lrdDocsItem ) => (
23
- lrdDocsItem . methods . map ( ( method , methodIndex ) => (
24
- < div key = { shortid . generate ( ) } >
25
- { ( lrdDocsItem . group != null && lrdDocsItem . group != "" && lrdDocsItem . group_index == 0 && methodIndex == 0 ) && (
26
- < li className = "pt-5 text-slate-600" >
27
- { /* Only in case of controller names full path -> just controller name */ }
28
- { lrdDocsItem . group . split ( '\\' ) . pop ( ) }
29
- </ li >
30
- ) }
31
- < li >
32
- < AnchorLink href = { '#' + method + lrdDocsItem . uri } className = "flex flex-row px-0 py-1" >
33
- < span className = { `method-${ method } uppercase text-xs w-12 p-0 flex flex-row-reverse` } >
34
- { method }
23
+ < div key = { shortid . generate ( ) } >
24
+ { ( lrdDocsItem . group != null && lrdDocsItem . group != "" && lrdDocsItem . group_index == 0 ) && (
25
+ < li className = "pt-5 text-slate-600" >
26
+ { /* Only in case of controller names full path -> just controller name */ }
27
+ { lrdDocsItem . group . split ( '\\' ) . pop ( ) }
28
+ </ li >
29
+ ) }
30
+ < li >
31
+ < AnchorLink href = { '#' + lrdDocsItem . http_method + lrdDocsItem . uri } className = "flex flex-row px-0 py-1" >
32
+ < span className = { `method-${ lrdDocsItem . http_method } uppercase text-xs w-12 p-0 flex flex-row-reverse` } >
33
+ { lrdDocsItem . http_method }
35
34
</ span >
36
- < span className = "flex-1 p-0 text-sm text-left break-all" >
35
+ < span className = "flex-1 p-0 text-sm text-left break-all" >
37
36
{ lrdDocsItem . uri }
38
37
</ span >
39
- </ AnchorLink >
40
- </ li >
41
- </ div >
42
- ) )
38
+ </ AnchorLink >
39
+ </ li >
40
+ </ div >
43
41
) ) }
44
42
< li className = 'bg-transparent' > </ li >
45
43
< li className = 'bg-transparent' > </ li >
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ export default function ApiActionInfo(props: Props) {
30
30
< tr >
31
31
< th > Method</ th >
32
32
< td >
33
- < span className = { `method-${ lrdDocsItem . httpMethod } uppercase` } >
34
- { lrdDocsItem . httpMethod }
33
+ < span className = { `method-${ lrdDocsItem . http_method } uppercase` } >
34
+ { lrdDocsItem . http_method }
35
35
</ span >
36
36
</ td >
37
37
</ tr >
Original file line number Diff line number Diff line change @@ -3,15 +3,14 @@ export interface IAPIRule {
3
3
}
4
4
export interface IAPIInfo {
5
5
uri : string ;
6
- methods : string [ ] ;
7
6
middlewares : string [ ] ;
8
7
controller : string ;
9
8
controller_full_path : string ;
10
9
method : string ;
11
- httpMethod : string ;
10
+ http_method : string ;
12
11
rules : IAPIRule ;
13
12
docBlock : string ;
14
13
group : string ;
15
14
group_index : number ;
16
15
responses : string [ ] ;
17
- }
16
+ }
You can’t perform that action at this time.
0 commit comments