You are here

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

Thrown when the library version is lower than the minimum supported one.

Parameters

string $library_version: The actual version of the Swagger UI library.

string $library_version_min: The minimum supported version of the Swagger UI library.

Return value

self The exception.

2 calls to SwaggerUiLibraryDiscoveryException::becauseLibraryVersionIsNotSupported()
SwaggerUiLibraryDiscovery::libraryVersion in src/Service/SwaggerUiLibraryDiscovery.php
Gets the Swagger UI library version.
SwaggerUiLibraryDiscovery::libraryVersion in tests/modules/swagger_ui_formatter_test/src/Service/SwaggerUiLibraryDiscovery.php
Gets the Swagger UI library version.

File

src/Exception/SwaggerUiLibraryDiscoveryException.php, line 111

Class

SwaggerUiLibraryDiscoveryException
Base exception for Swagger UI library discovery.

Namespace

Drupal\swagger_ui_formatter\Exception

Code

public static function becauseLibraryVersionIsNotSupported(string $library_version, string $library_version_min) : self {
  return new static(sprintf('The Swagger UI library version v%s is lower than the minimally supported v%s. Please download <a href="https://github.com/swagger-api/swagger-ui/releases" target="_blank">a newer version</a>.', $library_version, $library_version_min), self::CODE_LIBRARY_VERSION_IS_NOT_SUPPORTED);
}