Is your feature request related to a problem?
The Validator class used for the validator field in Setting is not Writeable.
What solution would you like?
Create a new class in the Hello World Extension package similar to ExampleCustomSettingsConfig in the OpenSearch example-plugins:custom-settings module. Demonstrate a validated string setting (see example in the custom setting plugin) that does not allow the word "forbidden".
In the Setting class, add a RegexValidator class implementing Validator<T> and Writeable that throws an exception if the String (regular expression) matches the input value.
- make the word that's forbidden a regex in a String field you set in the constructor, and that gets written.
Make sure the getSettings() extension point sends this setting to OpenSearch.
Update WriteableSetting to write the validator.
Is your feature request related to a problem?
The
Validatorclass used for thevalidatorfield inSettingis not Writeable.What solution would you like?
Create a new class in the Hello World Extension package similar to
ExampleCustomSettingsConfigin the OpenSearchexample-plugins:custom-settingsmodule. Demonstrate a validated string setting (see example in the custom setting plugin) that does not allow the word "forbidden".In the
Settingclass, add aRegexValidatorclass implementingValidator<T>andWriteablethat throws an exception if the String (regular expression) matches the input value.Make sure the
getSettings()extension point sends this setting to OpenSearch.Update
WriteableSettingto write the validator.