function hook_swagger_ui_library_directory_alter in Swagger UI Field Formatter 8.3
Alters the Swagger UI library directory path.
This hook is only invoked for the default theme (and its base themes). Modules can override the directory path by decorating the SwaggerUiLibraryDiscovery service.
Parameters
string $library_dir: The Swagger UI library directory path.
See also
Drupal\swagger_ui_formatter\Service\SwaggerUiLibraryDiscovery
File
- ./
swagger_ui_formatter.api.php, line 22
Code
function hook_swagger_ui_library_directory_alter(string &$library_dir) : void {
$library_dir = '/my/custom/path/to/swagger-ui/';
}