Netflix / archaius

Library for configuration management API
Apache License 2.0
2.46k stars 485 forks source link

Allow configuration proxies to apply custom validations to settings #697

Open rgallardo-netflix opened 9 months ago

rgallardo-netflix commented 9 months ago

Methods in configuration proxies could be annotated with constraints that limit the values that the method will accept from the underlying config. For example, a method annotated such as

@Min(0)
@Max(100)
public int getSettingWithConstraint()

would fail if the value from the underlying config is not a positive integer less than 101.