Class RestClientNameFallbackInterceptor

java.lang.Object
io.smallrye.config.AbstractMappingConfigSourceInterceptor
io.smallrye.config.FallbackConfigSourceInterceptor
io.quarkus.restclient.config.RestClientNameFallbackInterceptor
All Implemented Interfaces:
io.smallrye.config.ConfigSourceInterceptor, Serializable

@Priority(3610) public class RestClientNameFallbackInterceptor extends io.smallrye.config.FallbackConfigSourceInterceptor
Fallbacks REST Client FQN to Simple Name and quoted config keys to unquoted

Ideally, this shouldn't be required. The old custom implementation allowed us to mix both FQN and Simple Name in a merged configuration to use in the REST Client. The standard Config system does not support such a feature. If a configuration supports multiple names, the user has to use the same name across all configuration sources. No other Quarkus extension behaves this way because only the REST Client extension provides the custom code to make it work.

In the case of RegisterRestClient.configKey(), users either use quoted or unquoted configuration names for single config key segments. Again, the Config system does not support such a feature (but could be implemented), so the interceptor also fallbacks to unquoted configuration names, due to the force property added by AbstractRestClientConfigBuilder.configBuilder(SmallRyeConfigBuilder).

See Also: