-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Help and documentation with key value
A common problem with key value config is providing documentation. This is usually more for when a key value is retrieved from some down stream system.
The idea is if we using something like avaje-config or microprofile config and we do:
config.getInteger("blah");
And blah is either missing or not an integer etc we can currently provide location information but not general help of what the hell the key value is supposed to be used for.
This is sort of a similar problem in another key value like system: metrics. Prometheus tackles this with a # HELP annotation.
We could provide something similar however it does get a little tricky as this can quickly lead down to full on schema.
There are several systems that do provide "doc" but they do this more schema like. For example in Terraform one usually makes variables like:
variable "myvar" {
type = "string"
default = ""
}
That is not assigning a value but just declaring.
So the question is when and where does help information get loaded? Is it dynamic? Do we have a location information for the help (e.g. like this schema file)?
Required key values
A separate feature need is stating all these key values need to be present. This should be its own issue and is here only because it may work similar to help/doc
Type information
Again because of the above being very much schema like we could add type information but I'm not inclined to add this.
A lot of the above can be just tackled outside of EZKV and perhaps it should. This is because if EZKV adds this the KeyValue data type will likely have to change.
An alternative external solution would have KeyValueAndSchema:
record KeyValueAndSchema (KeyValue keyValue, Schema schema) {
}