|
1 | 1 | <?php
|
2 | 2 |
|
3 | 3 | 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', |
8 | 8 |
|
9 | 9 | /*
|
10 | 10 | * Route where request docs will be served from
|
11 | 11 | * localhost:8080/request-docs
|
12 | 12 | */
|
13 |
| - 'url' => 'request-docs', |
| 13 | + 'url' => 'api-docs', |
14 | 14 | 'middlewares' => [
|
15 | 15 | //Example
|
16 | 16 | // \App\Http\Middleware\NotFoundWhenProduction::class,
|
17 | 17 | ],
|
| 18 | + |
18 | 19 | /**
|
19 | 20 | * Path to to static HTML if using command line.
|
20 | 21 | */
|
|
23 | 24 | /**
|
24 | 25 | * Sorting route by and there is two types default(route methods), route_names.
|
25 | 26 | */
|
26 |
| - 'sort_by' => 'default', |
| 27 | + 'sort_by' => 'route_names', |
27 | 28 |
|
28 | 29 | //Use only routes where ->uri start with next string Using Str::startWith( . e.g. - /api/mobile
|
29 | 30 | 'only_route_uri_start_with' => '',
|
30 | 31 |
|
31 | 32 | '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', |
35 | 45 | ],
|
36 | 46 |
|
37 |
| - "open_api" => [ |
| 47 | + 'open_api' => [ |
38 | 48 | // default version that this library provides
|
39 |
| - "version" => "3.0.0", |
| 49 | + 'version' => '3.0.0', |
40 | 50 | // changeable
|
41 |
| - "document_version" => "1.0.0", |
| 51 | + 'document_version' => '1.0.0', |
42 | 52 | // 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'), |
46 | 56 |
|
47 | 57 | // for now putting default responses for all. This can be changed later based on specific needs
|
48 |
| - "responses" => [ |
| 58 | + 'responses' => [ |
49 | 59 | '200' => [
|
50 | 60 | 'description' => 'Successful operation',
|
51 |
| - 'content' => [ |
| 61 | + 'content' => [ |
52 | 62 | 'application/json' => [
|
53 | 63 | 'schema' => [
|
54 | 64 | 'type' => 'object',
|
|
58 | 68 | ],
|
59 | 69 | '400' => [
|
60 | 70 | 'description' => 'Bad Request',
|
61 |
| - 'content' => [ |
| 71 | + 'content' => [ |
62 | 72 | 'application/json' => [
|
63 | 73 | 'schema' => [
|
64 | 74 | 'type' => 'object',
|
|
68 | 78 | ],
|
69 | 79 | '401' => [
|
70 | 80 | 'description' => 'Unauthorized',
|
71 |
| - 'content' => [ |
| 81 | + 'content' => [ |
72 | 82 | 'application/json' => [
|
73 | 83 | 'schema' => [
|
74 | 84 | 'type' => 'object',
|
|
78 | 88 | ],
|
79 | 89 | '403' => [
|
80 | 90 | 'description' => 'Forbidden',
|
81 |
| - 'content' => [ |
| 91 | + 'content' => [ |
82 | 92 | 'application/json' => [
|
83 | 93 | 'schema' => [
|
84 | 94 | 'type' => 'object',
|
|
88 | 98 | ],
|
89 | 99 | '404' => [
|
90 | 100 | 'description' => 'Not Found',
|
91 |
| - 'content' => [ |
| 101 | + 'content' => [ |
92 | 102 | 'application/json' => [
|
93 | 103 | 'schema' => [
|
94 | 104 | 'type' => 'object',
|
|
98 | 108 | ],
|
99 | 109 | '422' => [
|
100 | 110 | 'description' => 'Unprocessable Entity',
|
101 |
| - 'content' => [ |
| 111 | + 'content' => [ |
102 | 112 | 'application/json' => [
|
103 | 113 | 'schema' => [
|
104 | 114 | 'type' => 'object',
|
|
108 | 118 | ],
|
109 | 119 | '500' => [
|
110 | 120 | 'description' => 'Internal Server Error',
|
111 |
| - 'content' => [ |
| 121 | + 'content' => [ |
112 | 122 | 'application/json' => [
|
113 | 123 | 'schema' => [
|
114 | 124 | 'type' => 'object',
|
|
118 | 128 | ],
|
119 | 129 | 'default' => [
|
120 | 130 | 'description' => 'Unexpected error',
|
121 |
| - 'content' => [ |
| 131 | + 'content' => [ |
122 | 132 | 'application/json' => [
|
123 | 133 | 'schema' => [
|
124 | 134 | 'type' => 'object',
|
|
127 | 137 | ],
|
128 | 138 | ],
|
129 | 139 | ],
|
130 |
| - ] |
| 140 | + ], |
131 | 141 | ];
|
0 commit comments