kopflos
kopflos copied to clipboard
Configuration chain
Once we load an API description, it should be the default behaviour and easy to use option for implementors to cascade configuration option, bottom-up.
Given a tree structure like
<Config> kopflos:api <Api> .
<Api> ^schema:isPartOf <ResourceShape> .
<ResourceShape> kopflos:handler <ResourceHandler> .
<ResourceShape> sh:property/kopflos:handler <PropertyHandler> .
it should be easy to look up a property by traversing from leaf to root PropertyHandler -> ResourceHandler -> ResourceShape -> Api -> Config.
If a property, like kopflos:resourceLoader, is not found on one level, try higher. If the Config resource does not have a value, we might resort to a config file for fallback and finally a global default.