Skip to content

Commit

Permalink
doc: reword external
Browse files Browse the repository at this point in the history
Signed-off-by: Simon de Vlieger <[email protected]>
  • Loading branch information
supakeen committed May 28, 2024
1 parent 70f6f47 commit 8b148cc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions doc/03-omnifest/02-external.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ The external gets called with the following JSON:
}
```

And is expected to return the following JSON:
And is expected to return a JSON dict with a single top-level `tree` object that
can contain arbitrary values. Additional top-level keys are not allowed. Example:

```json
{
Expand All @@ -43,28 +44,28 @@ And is expected to return the following JSON:
}
```

Which will lead to the following YAML structure:
Which will replace the previous `otk.external.name` subtree with the output of a
new subtree from the external comand. Example

```yaml
tree:
what:
you: "want"
what:
you: "want"
```
If the external returns `{}`, an empty object, `otk` will assume that there is
no tree to replace and remove the node instead. This will turn the following
YAML:

```yaml
dummy:
example:
otk.external.name:
options:
```

Into this YAML structure:

```yaml
dummy:
example:
```

## Paths
Expand Down

0 comments on commit 8b148cc

Please sign in to comment.