fix in object.md: clarified the conditions section

also fixed a dead link at the end of object.md
selene 2025-11-26 16:28:05 +01:00
parent 2d93b0e984
commit bce2cc3181
Signed by: sel
SSH key fingerprint: SHA256:33R/4Rx5Lu4o81LyJyXdMrmP5CJ6j7j1Soo0Dn7mKc0

@ -151,7 +151,7 @@ array of templates and their properties under `input` that this property matches
### `conditions` ### `conditions`
must be referring to another property (can be itself). array of values that property must have for this property to be valid in the object instance. **this is mostly there for `input.variant` shenanigans and is NOT to be used for data validation!** must be referring to another property (can be itself). array of values that property must have for this property to be valid in the object instance. **this is mostly there for `input.variant` shenanigans and is NOT to be used for advanced data validation!**
an example would look like this: an example would look like this:
@ -162,8 +162,19 @@ conditions = [
] ]
``` ```
if a property is referenced multiple times, all of the provided options will be valid (example from `meta/connection`):
```toml
conditions = [
["input.variant", "function"]
["input.variant", "transform"]
["input.variant", "subobject"]
["input.variant", "custom"]
]
```
### `duplicates` ### `duplicates`
boolean indicating if this property can be duplicated. boolean indicating if this property can be duplicated.
if `true`, it will use an array when represented in json. it can only contain properties specified in `transforms`. when used as transform destinations, duplicable properties add the source property's value to the first (0th) position, and the remaining positions can be filled later by [functions](functions.md). if `true`, it will use an array when represented in json. it can only contain properties specified in `transforms`. when used as transform destinations, duplicable properties add the source property's value to the first (0th) position, and the remaining positions can be filled later by [calculators](modularity.md#calculator).