private static boolean isHalEnabled(@NonNull HateoasProperties hateoasProperties) {
		// In spring-boot 3.5, the method name was changed from getUseHalAsDefaultJsonMediaType to isUseHalAsDefaultJsonMediaType
		var possibleMethodNames = List.of("isUseHalAsDefaultJsonMediaType", "getUseHalAsDefaultJsonMediaType");

		for (var methodName : possibleMethodNames) {
			var method = ReflectionUtils.findMethod(HateoasProperties.class, methodName);
			if (method != null) {
				var result = ReflectionUtils.invokeMethod(method, hateoasProperties);
				if (result instanceof Boolean halEnabled) {
					return halEnabled;
				}

				throw new IllegalStateException("Method " + methodName + " did not return a boolean value");
			}
		}

		throw new IllegalStateException("No suitable method found to determine if HAL is enabled");
	}
Instantiates a new Hateoas hal provider.

@param hateoasPropertiesOptional the hateoas properties optional
@param objectMapperProvider      the object mapper provider
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/HateoasHalProvider.java