When Swagger UI tries to fetch .map files (like swagger-ui.css.map) and they are missing from the vendor package, the current implementation throws a FileNotFoundException due to Filesystem::get('').
Suggestion: Add a simple check before loading the asset:
...
try {
$path = swagger_ui_dist_path($documentation, $asset);
if (empty($path) || !$fileSystem->exists($path)) {
\Log::warning('[SwaggerAsset] Asset not found: ' . $asset);
abort(404, 'Asset not found');
}
...
When Swagger UI tries to fetch .map files (like swagger-ui.css.map) and they are missing from the vendor package, the current implementation throws a FileNotFoundException due to Filesystem::get('').
Suggestion: Add a simple check before loading the asset: