Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions docs/add-ons/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,28 @@ not_need: "str?"

We support:

- `str` / `str(min,)` / `str(,max)` / `str(min,max)`
- `bool`
- `int` / `int(min,)` / `int(,max)` / `int(min,max)`
- `float` / `float(min,)` / `float(,max)` / `float(min,max)`
- `email`
- `url`
- `password`
- `port`
- `match(REGEX)`
- `list(val1|val2|...)`
- `device` / `device(filter)`: Device filter can be in the following format: `subsystem=TYPE` i.e. `subsystem=tty` for serial devices.
- `str` / `str(min,)` / `str(,max)` / `str(min,max)`: Arbitrary string with optional min/max length.
- `bool`: `true`/`false`. Will attempt to parse strings and numbers as boolean values.
- `int` / `int(min,)` / `int(,max)` / `int(min,max)`: Integer with optional lower/upper bound (inclusive).
- `float` / `float(min,)` / `float(,max)` / `float(min,max)`: Floating point number with optional lower/upper bound (inclusive).
- `email`: A string representing an email address.
- `url`: A string representing an URL.
- `password`: A string representing a password.
- `port`: A integer representing a port number. Will attempt to parse strings as port numbers.
- `match(REGEX)`: A string matching the specified regular expression.
- `list(val1|val2|...)`: A string from a fixed set (`val1`, `val2`, ...) of values.
- `device` / `device(filter)`: A string referencing a device path (e.g. `/dev/ttyS0`).
Device filter can be in the following format: `subsystem=TYPE` (e.g. `subsystem=tty` for serial devices).
- Lists of some underlying element type:
```yaml
random:
- "match(^\\w*$)"
- Nested dictionaries, e.g.:
```yaml
logins:
- username: str
password: str
```

## Add-on extended build

Expand Down