Annotation Interface WithKeys


@Documented @Retention(RUNTIME) @Target({METHOD,TYPE_USE}) public @interface WithKeys
Provide a list of map keys when populating Map types.

When populating a Map, SmallRyeConfig requires the configuration names listed in SmallRyeConfig.getPropertyNames() to be able to find the Map keys. The provided list will effectively substitute the lookup in SmallRyeConfig.getPropertyNames(), thus enabling a ConfigSource that does not list its properties, to contribute configuration to the Map.

Each key must exist in the final configuration (relative to the Map path segment), or the mapping will fail with a ConfigValidationException.

In the case of Map value references a Collection, SmallRyeConfig would still require the lookup in SmallRyeConfig.getPropertyNames().