Get
Print the behavior DSL: each option, method, example part and field tag.
Print each part of the behavior DSL, what it makes osapi do and when to use it.
The list comes from this binary. Thus it agrees with the build that you run.
Read it before you write a behavior, then check the result with
osapi dsl behavior validate.
osapi dsl behavior spec get
Examples
osapi dsl behavior spec get
osapi dsl behavior spec get --json
Result
The command prints:
$ osapi dsl behavior spec get Definition: Register(Define(name, doc, options...)) Declares the behavior and adds it to the registry. The agent, the server, the CLI and the generator read the registry. Use: One time, in behavior.go: var Behavior = behavior.Register(behavior.Define(...)).
With --json, the command prints:
{
"kinds": [
{
"kind": "definition",
"title": "Definition",
"terms": [
{
"kind": "definition",
"name": "Register(Define(name, doc, options...))",
"does": "Declares the behavior and adds it to the registry. The agent, the server, the CLI and the generator read the registry.",
"when": "One time, in behavior.go: var Behavior = behavior.Register(behavior.Define(...))."
}
]
}
]
}
Global flags
| Flag | Description | Default |
|---|---|---|
-d, --debug | Enable or disable debug mode | |
-j, --json | Enable JSON output | |
-f, --osapi-file | Path to config file; without one at the default path, osapi runs on the defaults | /etc/osapi/osapi.yaml |
Output tells how the result is printed, and what --json
gives.