You are here

public static function SwaggerUiLibraryDiscoveryException::becauseRequiredLibraryFileIsNotFound in Swagger UI Field Formatter 8.3

Thrown when a required Swagger UI library file is not found.

Parameters

string $file_path: The path of the required Swagger UI library file.

Return value

self The exception.

1 call to SwaggerUiLibraryDiscoveryException::becauseRequiredLibraryFileIsNotFound()
SwaggerUiLibraryDiscovery::validateLibraryDirectory in src/Service/SwaggerUiLibraryDiscovery.php
Validates a given Swagger UI library directory.

File

src/Exception/SwaggerUiLibraryDiscoveryException.php, line 55

Class

SwaggerUiLibraryDiscoveryException
Base exception for Swagger UI library discovery.

Namespace

Drupal\swagger_ui_formatter\Exception

Code

public static function becauseRequiredLibraryFileIsNotFound(string $file_path) : self {
  return new static(sprintf('The Swagger UI library directory is invalid because the required "%s" file is not found.', $file_path), self::CODE_REQUIRED_FILE_IS_NOT_FOUND);
}