laravel-request-docs
laravel-request-docs copied to clipboard
/api/* routes not included in generated docs
Hi All,
Is there any reason why my /api/* routes are not getting included in the generated documents?
They are available when I run php artisan route:list but not in the LRD docs.
Any ideas?
Thanks!
Nathan
https://github.com/rakutentech/laravel-request-docs/blob/master/config/request-docs.php#L6
Turn this to true and find out if there are any error on the page that is making it not show up.
Call to a member function get() on null
The line starting with device_id is the line throwing the error:
public function rules()
{
// dd($this);
return [
'device_id' => ['required', 'string', 'unique:App\Models\ScannerDevice,device_id,'.$this->device->id],
'location' => ['required', 'string'],
];
}
This is not an api/ route, and when setting Debug to false, the route related to the above is generated just fine.
Follow this: https://github.com/rakutentech/laravel-request-docs/issues/83#issuecomment-1242737419
Is there any reason why my /api/* routes are not getting included in the generated documents?
By default /api/* routes are not in the exclude pattern, the only explanation is that there is an object there that is throwing errors making the library not able to parse the rules.
Follow this: #83 (comment)
I've had a look at this comment, and have tried what is suggested, however the behaviour is not changed at all.
Is there an example of how to use the Middlewares section of the config?