Closed agners closed 1 month ago
docs/add-ons/configuration.md
[uncategorized] ~203-~203: Possible missing comma found. Context: ...onary to make an option mandatory. This way the option needs to be given by the use... (AI_HYDRA_LEO_MISSING_COMMA)
docs/add-ons/configuration.md (1)
`205-205`: **LGTM!** The explanation of making an option truly optional using the `schema` dictionary is clear and concise.
Note that the somewhat strange combination of:
options:
test: null
schema:
test: str?
Is valid from a Supervisor/backend perspective. This essentially means by default we ask the user to provide a value for test, but if the user doesn't want to provide (e.g. wants to opt-out), he can do so.
This is not (well) supported by the frontend. You can opt-out of providing test by deleting the option (test: null
) in YAML mode, which correctly saves that config. But the frontend fills the default value back in. So you have to remove the config option every time.
Proposed change
The
options
andschema
behavior is a bit intertwined when it comes to optional values. This is probably because theschema
came later and is still optional today.Make it clear what is necessary to make an option truly optional.
Type of change
Additional information
Summary by CodeRabbit
options
andschema
dictionaries for defining mandatory and optional options in add-ons.