Generate
Write the CLI, DSL and reference pages of the docs site.
It writes each generated page of the docs site from this binary, and removes each generated page that no command, DSL or group has now:
- a page for each command, under
docs/docs/sidebar/usage/cli; - a page for each DSL, under
docs/docs/sidebar/development/dsl, from the spec that thespec getcommand of the DSL prints; - a page for each behavior, chain, endpoint group and local group, under
docs/docs/sidebar/reference, from the output of itslistorgetcommand, such asosapi dsl behavior get --name dns.
A DSL page that a person wrote stays. just cli-docs-generate runs it, and
just test checks that the pages match the binary.
osapi dsl docs generate [flags]
Examples
osapi dsl docs generate
osapi dsl docs generate --root ~/src/osapi
Result
The command prints:
$ osapi dsl docs generate Docs: CLI pages: 244 DSL pages: 4 Reference pages: 93
With --json, the command prints:
{
"cli": 244,
"dsl": 4,
"reference": 93
}
Flags
| Flag | Description | Default |
|---|---|---|
--root | Root of the osapi repository | . |
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.