You are here

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

Thrown when the library version is not found in the package.json file.

Parameters

string $package_json_path: The Swagger UI library's package.json file path.

Return value

self The exception.

1 call to SwaggerUiLibraryDiscoveryException::becauseUnableToIdentifyLibraryVersion()
SwaggerUiLibraryDiscovery::libraryVersion in src/Service/SwaggerUiLibraryDiscovery.php
Gets the Swagger UI library version.

File

src/Exception/SwaggerUiLibraryDiscoveryException.php, line 96

Class

SwaggerUiLibraryDiscoveryException
Base exception for Swagger UI library discovery.

Namespace

Drupal\swagger_ui_formatter\Exception

Code

public static function becauseUnableToIdentifyLibraryVersion(string $package_json_path) : self {
  return new static(sprintf('The Swagger UI library version is not found in "%s".', $package_json_path), self::CODE_UNABLE_TO_IDENTIFY_LIBRARY_VERSION);
}