Skip to content

Commit 8c5bed3

Browse files
Merge pull request #93 from rawahamid/patch-4
Update request-docs.php
2 parents 13f44b1 + 22d0b10 commit 8c5bed3

File tree

1 file changed

+35
-25
lines changed

1 file changed

+35
-25
lines changed

config/request-docs.php

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
<?php
22

33
return [
4-
// change it to true will make lrd to throw exception if rules in request class need to be changed
5-
// keep it false
6-
'debug' => false,
7-
'document_name' => 'LRD',
4+
// change it to true will make lrd to throw exception if rules in request class need to be changed
5+
// keep it false
6+
'debug' => false,
7+
'document_name' => 'LRD',
88

99
/*
1010
* Route where request docs will be served from
1111
* localhost:8080/request-docs
1212
*/
13-
'url' => 'request-docs',
13+
'url' => 'api-docs',
1414
'middlewares' => [
1515
//Example
1616
// \App\Http\Middleware\NotFoundWhenProduction::class,
1717
],
18+
1819
/**
1920
* Path to to static HTML if using command line.
2021
*/
@@ -23,32 +24,41 @@
2324
/**
2425
* Sorting route by and there is two types default(route methods), route_names.
2526
*/
26-
'sort_by' => 'default',
27+
'sort_by' => 'route_names',
2728

2829
//Use only routes where ->uri start with next string Using Str::startWith( . e.g. - /api/mobile
2930
'only_route_uri_start_with' => '',
3031

3132
'hide_matching' => [
32-
"#^telescope#",
33-
"#^docs#",
34-
"#^request-docs#",
33+
'#^telescope#',
34+
'#^docs#',
35+
'#^request-docs#',
36+
'#^api-docs#',
37+
'#^sanctum#',
38+
'#^_ignition#',
39+
],
40+
41+
'request_methods' => [
42+
'rules',
43+
'onCreate',
44+
'onUpdate',
3545
],
3646

37-
"open_api" => [
47+
'open_api' => [
3848
// default version that this library provides
39-
"version" => "3.0.0",
49+
'version' => '3.0.0',
4050
// changeable
41-
"document_version" => "1.0.0",
51+
'document_version' => '1.0.0',
4252
// license that you want to display
43-
"license" => "Apache 2.0",
44-
"license_url" => "https://www.apache.org/licenses/LICENSE-2.0.html",
45-
"server_url" => env('APP_URL', 'http://localhost'),
53+
'license' => 'Apache 2.0',
54+
'license_url' => 'https://www.apache.org/licenses/LICENSE-2.0.html',
55+
'server_url' => env('APP_URL', 'http://localhost'),
4656

4757
// for now putting default responses for all. This can be changed later based on specific needs
48-
"responses" => [
58+
'responses' => [
4959
'200' => [
5060
'description' => 'Successful operation',
51-
'content' => [
61+
'content' => [
5262
'application/json' => [
5363
'schema' => [
5464
'type' => 'object',
@@ -58,7 +68,7 @@
5868
],
5969
'400' => [
6070
'description' => 'Bad Request',
61-
'content' => [
71+
'content' => [
6272
'application/json' => [
6373
'schema' => [
6474
'type' => 'object',
@@ -68,7 +78,7 @@
6878
],
6979
'401' => [
7080
'description' => 'Unauthorized',
71-
'content' => [
81+
'content' => [
7282
'application/json' => [
7383
'schema' => [
7484
'type' => 'object',
@@ -78,7 +88,7 @@
7888
],
7989
'403' => [
8090
'description' => 'Forbidden',
81-
'content' => [
91+
'content' => [
8292
'application/json' => [
8393
'schema' => [
8494
'type' => 'object',
@@ -88,7 +98,7 @@
8898
],
8999
'404' => [
90100
'description' => 'Not Found',
91-
'content' => [
101+
'content' => [
92102
'application/json' => [
93103
'schema' => [
94104
'type' => 'object',
@@ -98,7 +108,7 @@
98108
],
99109
'422' => [
100110
'description' => 'Unprocessable Entity',
101-
'content' => [
111+
'content' => [
102112
'application/json' => [
103113
'schema' => [
104114
'type' => 'object',
@@ -108,7 +118,7 @@
108118
],
109119
'500' => [
110120
'description' => 'Internal Server Error',
111-
'content' => [
121+
'content' => [
112122
'application/json' => [
113123
'schema' => [
114124
'type' => 'object',
@@ -118,7 +128,7 @@
118128
],
119129
'default' => [
120130
'description' => 'Unexpected error',
121-
'content' => [
131+
'content' => [
122132
'application/json' => [
123133
'schema' => [
124134
'type' => 'object',
@@ -127,5 +137,5 @@
127137
],
128138
],
129139
],
130-
]
140+
],
131141
];

0 commit comments

Comments
 (0)