Open s1ghn opened 4 weeks ago
4.37
8.3.9
Laravel
11.28
static.output_path => "docs" laravel.add_routes => false laravel.docs_url => "/" auth.enabled => true auth.default => true auth.use_value => "xxxxx"
When generating the api docs, routes which
a) have an optional parameter b) are prefixed by a Route::prefix()->group(...)
are missing prefixes and the optional parameter.
You can verify by creating this example:
Route::prefix('users')->name('users.')->group(function () { Route::get('{user?}/show', fn () => 'hello')->name('show'); });
Expected result:
users/{user?}/show
Actual result:
//show
This issue does not appear however when using non optional parameters.
Update: It works again when nesting another prefix, and putting the route in there
Scribe version
4.37
PHP version
8.3.9
Framework
Laravel
Framework version
11.28
Scribe config
What happened?
When generating the api docs, routes which
a) have an optional parameter b) are prefixed by a Route::prefix()->group(...)
are missing prefixes and the optional parameter.
You can verify by creating this example:
Expected result:
Actual result:
This issue does not appear however when using non optional parameters.
Docs