Class RestClientNameUnquotedFallbackInterceptor

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

@Priority(3605) public class RestClientNameUnquotedFallbackInterceptor extends io.smallrye.config.FallbackConfigSourceInterceptor
Relocates unquoted config keys to quoted

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 relocates to unquoted configuration names.

We need a double-way relocation / fallback mapping between unquoted and quoted because SmallRye Config will use the first distict key it finds to populate RestClientsConfig.clients() in the list of property names. If quoted, it will search for all quoted. If unquoted, it will search for all unquoted. We cannot be sure how the user sets the configuration, especially considering that we may not be able to query the list directly if the config comes from a source that does not support listing property names.

See Also:
  • Constructor Details