diff --git a/config/request-docs.php b/config/request-docs.php index 2fe782d..4e0675a 100644 --- a/config/request-docs.php +++ b/config/request-docs.php @@ -1,20 +1,21 @@ false, - 'document_name' => 'LRD', + // change it to true will make lrd to throw exception if rules in request class need to be changed + // keep it false + 'debug' => false, + 'document_name' => 'LRD', /* * Route where request docs will be served from * localhost:8080/request-docs */ - 'url' => 'request-docs', + 'url' => 'api-docs', 'middlewares' => [ //Example // \App\Http\Middleware\NotFoundWhenProduction::class, ], + /** * Path to to static HTML if using command line. */ @@ -23,32 +24,41 @@ /** * Sorting route by and there is two types default(route methods), route_names. */ - 'sort_by' => 'default', + 'sort_by' => 'route_names', //Use only routes where ->uri start with next string Using Str::startWith( . e.g. - /api/mobile 'only_route_uri_start_with' => '', 'hide_matching' => [ - "#^telescope#", - "#^docs#", - "#^request-docs#", + '#^telescope#', + '#^docs#', + '#^request-docs#', + '#^api-docs#', + '#^sanctum#', + '#^_ignition#', + ], + + 'request_methods' => [ + 'rules', + 'onCreate', + 'onUpdate', ], - "open_api" => [ + 'open_api' => [ // default version that this library provides - "version" => "3.0.0", + 'version' => '3.0.0', // changeable - "document_version" => "1.0.0", + 'document_version' => '1.0.0', // license that you want to display - "license" => "Apache 2.0", - "license_url" => "https://www.apache.org/licenses/LICENSE-2.0.html", - "server_url" => env('APP_URL', 'http://localhost'), + 'license' => 'Apache 2.0', + 'license_url' => 'https://www.apache.org/licenses/LICENSE-2.0.html', + 'server_url' => env('APP_URL', 'http://localhost'), // for now putting default responses for all. This can be changed later based on specific needs - "responses" => [ + 'responses' => [ '200' => [ 'description' => 'Successful operation', - 'content' => [ + 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', @@ -58,7 +68,7 @@ ], '400' => [ 'description' => 'Bad Request', - 'content' => [ + 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', @@ -68,7 +78,7 @@ ], '401' => [ 'description' => 'Unauthorized', - 'content' => [ + 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', @@ -78,7 +88,7 @@ ], '403' => [ 'description' => 'Forbidden', - 'content' => [ + 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', @@ -88,7 +98,7 @@ ], '404' => [ 'description' => 'Not Found', - 'content' => [ + 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', @@ -98,7 +108,7 @@ ], '422' => [ 'description' => 'Unprocessable Entity', - 'content' => [ + 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', @@ -108,7 +118,7 @@ ], '500' => [ 'description' => 'Internal Server Error', - 'content' => [ + 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', @@ -118,7 +128,7 @@ ], 'default' => [ 'description' => 'Unexpected error', - 'content' => [ + 'content' => [ 'application/json' => [ 'schema' => [ 'type' => 'object', @@ -127,5 +137,5 @@ ], ], ], - ] + ], ];