public static function SwaggerUiLibraryDiscoveryException::becausePackageJsonCannotBeDecoded in Swagger UI Field Formatter 8.3
Thrown when the Swagger UI library's package.json file cannot be decoded.
Parameters
string $package_json_path: The Swagger UI library's package.json file path.
string $json_last_error_msg: The error message of the last json_decode() call.
Return value
self The exception.
1 call to SwaggerUiLibraryDiscoveryException::becausePackageJsonCannotBeDecoded()
- SwaggerUiLibraryDiscovery::libraryVersion in src/
Service/ SwaggerUiLibraryDiscovery.php - Gets the Swagger UI library version.
File
- src/
Exception/ SwaggerUiLibraryDiscoveryException.php, line 83
Class
- SwaggerUiLibraryDiscoveryException
- Base exception for Swagger UI library discovery.
Namespace
Drupal\swagger_ui_formatter\ExceptionCode
public static function becausePackageJsonCannotBeDecoded(string $package_json_path, string $json_last_error_msg) : self {
return new static(sprintf('Cannot decode the Swagger UI library\'s package.json file in "%s": "%s".', $package_json_path, $json_last_error_msg), self::CODE_CANNOT_DECODE_PACKAGE_JSON);
}