public function SwaggerUiLibraryDiscovery::libraryVersion in Swagger UI Field Formatter 8.3
Same name in this branch
- 8.3 src/Service/SwaggerUiLibraryDiscovery.php \Drupal\swagger_ui_formatter\Service\SwaggerUiLibraryDiscovery::libraryVersion()
- 8.3 tests/modules/swagger_ui_formatter_test/src/Service/SwaggerUiLibraryDiscovery.php \Drupal\swagger_ui_formatter_test\Service\SwaggerUiLibraryDiscovery::libraryVersion()
Gets the Swagger UI library version.
Return value
string The Swagger UI library version.
Throws
\Drupal\swagger_ui_formatter\Exception\SwaggerUiLibraryDiscoveryExceptionInterface
Overrides SwaggerUiLibraryDiscoveryInterface::libraryVersion
File
- tests/
modules/ swagger_ui_formatter_test/ src/ Service/ SwaggerUiLibraryDiscovery.php, line 90
Class
- SwaggerUiLibraryDiscovery
- Decorator service for testing.
Namespace
Drupal\swagger_ui_formatter_test\ServiceCode
public function libraryVersion() : string {
if ($this->state
->get(self::STATE_FAKE_UNSUPPORTED_LIBRARY)) {
throw SwaggerUiLibraryDiscoveryException::becauseLibraryVersionIsNotSupported('3.32.1', $this->decorated::MIN_SUPPORTED_LIBRARY_VERSION);
}
return $this->decorated
->libraryVersion();
}