Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 35 additions & 25 deletions config/request-docs.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<?php

return [
// 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',
// 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.
*/
Expand All @@ -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',
Expand All @@ -58,7 +68,7 @@
],
'400' => [
'description' => 'Bad Request',
'content' => [
'content' => [
'application/json' => [
'schema' => [
'type' => 'object',
Expand All @@ -68,7 +78,7 @@
],
'401' => [
'description' => 'Unauthorized',
'content' => [
'content' => [
'application/json' => [
'schema' => [
'type' => 'object',
Expand All @@ -78,7 +88,7 @@
],
'403' => [
'description' => 'Forbidden',
'content' => [
'content' => [
'application/json' => [
'schema' => [
'type' => 'object',
Expand All @@ -88,7 +98,7 @@
],
'404' => [
'description' => 'Not Found',
'content' => [
'content' => [
'application/json' => [
'schema' => [
'type' => 'object',
Expand All @@ -98,7 +108,7 @@
],
'422' => [
'description' => 'Unprocessable Entity',
'content' => [
'content' => [
'application/json' => [
'schema' => [
'type' => 'object',
Expand All @@ -108,7 +118,7 @@
],
'500' => [
'description' => 'Internal Server Error',
'content' => [
'content' => [
'application/json' => [
'schema' => [
'type' => 'object',
Expand All @@ -118,7 +128,7 @@
],
'default' => [
'description' => 'Unexpected error',
'content' => [
'content' => [
'application/json' => [
'schema' => [
'type' => 'object',
Expand All @@ -127,5 +137,5 @@
],
],
],
]
],
];